[ 
https://issues.apache.org/jira/browse/GEODE-2014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15596047#comment-15596047
 ] 

ASF GitHub Bot commented on GEODE-2014:
---------------------------------------

Github user kjduling commented on a diff in the pull request:

    https://github.com/apache/incubator-geode/pull/265#discussion_r84528366
  
    --- Diff: 
geode-assembly/src/test/java/org/apache/geode/rest/internal/web/SwaggerVerificationTest.java
 ---
    @@ -0,0 +1,57 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.geode.rest.internal.web;
    +
    +
    +import static org.hamcrest.CoreMatchers.*;
    +import static org.junit.Assert.*;
    +
    +import org.apache.http.HttpResponse;
    +import org.apache.http.client.methods.HttpGet;
    +import org.json.JSONObject;
    +import org.junit.Test;
    +import org.junit.experimental.categories.Category;
    +
    +import org.apache.geode.internal.i18n.LocalizedStrings;
    +import org.apache.geode.test.junit.categories.IntegrationTest;
    +
    +@Category(IntegrationTest.class)
    +
    +public class SwaggerVerificationTest extends AbstractRestTest {
    +
    +  @Test
    +  public void isSwaggerRunning() throws Exception {
    +    // Check the UI
    +    HttpResponse response = doRequest(new 
HttpGet("/geode/swagger-ui.html"), "", "");
    +    assertThat(getCode(response), is(200));
    +
    +    // Check the JSON
    +    response = doRequest(new HttpGet("/geode/v2/api-docs"), "", "");
    --- End diff --
    
    "geode/v2/api-docs" is the endpoint for Swagger2 documentation.  Swagger 
was "geode/api-docs".  Geode's endpoints are all "geode/v1/*" and I've verified 
that if/when the REST API revision is bumped to "v2", there will be no conflict 
unless we create a new endpoint called "v2/api-docs".
    
    This is supposed to be able to be overridden with the 
"springfox.documentation.swagger.v2.path" env property, but it doesn't seem to 
be honored.  Or SwaggerConfig is being loaded too late in the lifecycle, which 
I doubt.  At any rate, I am adding the structure to use this, but leaving the 
values set to the default ones.


> Upgrade Swagger libraries
> -------------------------
>
>                 Key: GEODE-2014
>                 URL: https://issues.apache.org/jira/browse/GEODE-2014
>             Project: Geode
>          Issue Type: Improvement
>          Components: docs, rest (dev)
>    Affects Versions: 1.0.0-incubating
>            Reporter: Kevin Duling
>            Assignee: Kevin Duling
>
> Upgrade swagger and swagger-springmvc



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to