Skip to content

Commit

Permalink
Add external docs attribute to swagger spec (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
gayanW authored and dkayiwa committed Aug 29, 2017
1 parent 639ad02 commit c376d1a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.openmrs.module.webservices.docs.swagger;

import io.swagger.models.Contact;
import io.swagger.models.ExternalDocs;
import io.swagger.models.Info;
import io.swagger.models.License;
import io.swagger.models.Model;
Expand Down Expand Up @@ -182,8 +183,11 @@ private void initSwagger() {
.securityDefinition("basic_auth", new BasicAuthDefinition())
.security(new SecurityRequirement().requirement("basic_auth"))
.consumes("application/json")
.produces("application/json");

.produces("application/json")
.externalDocs(new ExternalDocs()
.description("Find more info on REST Module Wiki")
.url("https://wiki.openmrs.org/display/docs/REST+Module"));

String host = baseUrl.split("/")[0];
String basePath = baseUrl.substring(baseUrl.indexOf("/")) + "/v1";
this.swagger
Expand Down

0 comments on commit c376d1a

Please sign in to comment.