Commit 28eca8f5 authored by mbr's avatar mbr
Browse files

Add swagger example

parent 44c5cc0e
Pipeline #286859 passed with stages
in 15 minutes and 20 seconds
......@@ -24,7 +24,7 @@
<parent>
<artifactId>EVSClient</artifactId>
<groupId>net.ihe.gazelle</groupId>
<version>5.13.3-SNAPSHOT</version>
<version>5.13.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -25,7 +25,7 @@
<parent>
<artifactId>EVSClient</artifactId>
<groupId>net.ihe.gazelle</groupId>
<version>5.13.3-SNAPSHOT</version>
<version>5.13.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -631,26 +631,26 @@
<id>dev</id>
<build>
<plugins>
<!-- <plugin>-->
<!-- <groupId>io.swagger</groupId>-->
<!-- <artifactId>swagger-codegen-maven-plugin</artifactId>-->
<!-- <version>2.3.1</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>generate</goal>-->
<!-- </goals>-->
<!-- <phase>package</phase>-->
<!-- <configuration>-->
<!-- <inputSpec>src/main/resources/Gazelle_EVSClient-API-1_00.yml</inputSpec>-->
<!-- <language>java</language>-->
<!-- <configOptions>-->
<!-- <sourceFolder>src/main/java/io/swagger/sample</sourceFolder>-->
<!-- </configOptions>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<phase>package</phase>
<configuration>
<inputSpec>${project.build.directory}/../src/main/resources/Gazelle_EVSClient-API-1_00.yml</inputSpec>
<language>java</language>
<configOptions>
<sourceFolder>src/main/java/net</sourceFolder>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
......
......@@ -29,7 +29,7 @@ public class Dog {
@Operation(summary = "Delete user",
description = "This can only be done by the logged in user.")
@ApiResponses(value = {
@ApiResponse(responseCode = "100", description = "user deteled"),
@ApiResponse(responseCode = "100", description = "dog deleted"),
@ApiResponse(responseCode = "101", description = "Invalid username supplied"),
@ApiResponse(responseCode = "102", description = "User not found")})
public Response addDog(
......
......@@ -23,10 +23,10 @@ public class CatResource {
@POST
@Consumes("application/json")
@Operation(summary = "Delete cat",
@Operation(summary = "Deletion of cat",
description = "This can be done by everyone.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "user deteled"),
@ApiResponse(responseCode = "200", description = "cat deleted"),
@ApiResponse(responseCode = "404", description = "Invalid username supplied"),
@ApiResponse(responseCode = "405", description = "User not found")})
public Response addCat(
......
......@@ -29,7 +29,7 @@ public class PetResource {
@Operation(summary = "Delete user",
description = "This can only be done by the logged in user.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "user deteled"),
@ApiResponse(responseCode = "200", description = "pet deleted"),
@ApiResponse(responseCode = "400", description = "Invalid username supplied"),
@ApiResponse(responseCode = "402", description = "User not found")})
public Response addPet(
......
......@@ -25,7 +25,7 @@
<parent>
<artifactId>EVSClient</artifactId>
<groupId>net.ihe.gazelle</groupId>
<version>5.13.3-SNAPSHOT</version>
<version>5.13.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
......
{"openapi":"3.0.1","paths":{"/dog/{dogId}":{"get":{"operationId":"getDogById","parameters":[{"name":"dogId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Pet"}}}}}}},"/dog":{"post":{"summary":"Delete user","description":"This can only be done by the logged in user.","operationId":"addDog","requestBody":{"description":"Dog object that needs to be added to the store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}},"required":true},"responses":{"100":{"description":"user deteled"},"101":{"description":"Invalid username supplied"},"102":{"description":"User not found"}}}},"/cat/{catId}":{"get":{"operationId":"getCatById","parameters":[{"name":"catId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cat"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Cat"}}}}}}},"/cat":{"post":{"summary":"Delete cat","description":"This can be done by everyone.","operationId":"addCat","requestBody":{"description":"Cat object that needs to be added to the store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cat"}}},"required":true},"responses":{"200":{"description":"user deteled"},"404":{"description":"Invalid username supplied"},"405":{"description":"User not found"}}}},"/pet/{petId}":{"get":{"operationId":"getPetById","parameters":[{"name":"petId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Pet"}}}}}}},"/pet":{"post":{"summary":"Delete user","description":"This can only be done by the logged in user.","operationId":"addPet","requestBody":{"description":"Pet object that needs to be added to the store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}},"required":true},"responses":{"200":{"description":"user deteled"},"400":{"description":"Invalid username supplied"},"402":{"description":"User not found"}}}}},"components":{"schemas":{"Pet":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"race":{"type":"string"}},"xml":{"name":"Pet"}},"Cat":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"race":{"type":"string"}},"xml":{"name":"Cat"}}}}}
\ No newline at end of file
{"openapi":"3.0.1","paths":{"/dog/{dogId}":{"get":{"operationId":"getDogById","parameters":[{"name":"dogId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Pet"}}}}}}},"/dog":{"post":{"summary":"Delete user","description":"This can only be done by the logged in user.","operationId":"addDog","requestBody":{"description":"Dog object that needs to be added to the store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}},"required":true},"responses":{"100":{"description":"dog deleted"},"101":{"description":"Invalid username supplied"},"102":{"description":"User not found"}}}},"/cat":{"post":{"summary":"Deletion of cat","description":"This can be done by everyone.","operationId":"addCat","requestBody":{"description":"Cat object that needs to be added to the store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cat"}}},"required":true},"responses":{"200":{"description":"cat deleted"},"404":{"description":"Invalid username supplied"},"405":{"description":"User not found"}}}},"/cat/{catId}":{"get":{"operationId":"getCatById","parameters":[{"name":"catId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Cat"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Cat"}}}}}}},"/pet/{petId}":{"get":{"operationId":"getPetById","parameters":[{"name":"petId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Pet"}}}}}}},"/pet":{"post":{"summary":"Delete user","description":"This can only be done by the logged in user.","operationId":"addPet","requestBody":{"description":"Pet object that needs to be added to the store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}},"required":true},"responses":{"200":{"description":"pet deleted"},"400":{"description":"Invalid username supplied"},"402":{"description":"User not found"}}}}},"components":{"schemas":{"Pet":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"race":{"type":"string"}},"xml":{"name":"Pet"}},"Cat":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"race":{"type":"string"}},"xml":{"name":"Cat"}}}}}
\ No newline at end of file
......@@ -30,7 +30,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.ihe.gazelle</groupId>
<artifactId>EVSClient</artifactId>
<version>5.13.3-SNAPSHOT</version>
<version>5.13.5-SNAPSHOT</version>
<packaging>pom</packaging>
<name>EVSClient</name>
<description>EVSClient project, External Validation Service Front-end</description>
......@@ -222,13 +222,13 @@
<dependency>
<groupId>net.ihe.gazelle</groupId>
<artifactId>EVSClient-ejb</artifactId>
<version>5.13.3-SNAPSHOT</version>
<version>5.13.5-SNAPSHOT</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>net.ihe.gazelle</groupId>
<artifactId>EVSClient-ui</artifactId>
<version>5.13.3-SNAPSHOT</version>
<version>5.13.5-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment