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 @@ ...@@ -24,7 +24,7 @@
<parent> <parent>
<artifactId>EVSClient</artifactId> <artifactId>EVSClient</artifactId>
<groupId>net.ihe.gazelle</groupId> <groupId>net.ihe.gazelle</groupId>
<version>5.13.3-SNAPSHOT</version> <version>5.13.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<parent> <parent>
<artifactId>EVSClient</artifactId> <artifactId>EVSClient</artifactId>
<groupId>net.ihe.gazelle</groupId> <groupId>net.ihe.gazelle</groupId>
<version>5.13.3-SNAPSHOT</version> <version>5.13.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -631,26 +631,26 @@ ...@@ -631,26 +631,26 @@
<id>dev</id> <id>dev</id>
<build> <build>
<plugins> <plugins>
<!-- <plugin>--> <plugin>
<!-- <groupId>io.swagger</groupId>--> <groupId>io.swagger</groupId>
<!-- <artifactId>swagger-codegen-maven-plugin</artifactId>--> <artifactId>swagger-codegen-maven-plugin</artifactId>
<!-- <version>2.3.1</version>--> <version>2.3.1</version>
<!-- <executions>--> <executions>
<!-- <execution>--> <execution>
<!-- <goals>--> <goals>
<!-- <goal>generate</goal>--> <goal>generate</goal>
<!-- </goals>--> </goals>
<!-- <phase>package</phase>--> <phase>package</phase>
<!-- <configuration>--> <configuration>
<!-- <inputSpec>src/main/resources/Gazelle_EVSClient-API-1_00.yml</inputSpec>--> <inputSpec>${project.build.directory}/../src/main/resources/Gazelle_EVSClient-API-1_00.yml</inputSpec>
<!-- <language>java</language>--> <language>java</language>
<!-- <configOptions>--> <configOptions>
<!-- <sourceFolder>src/main/java/io/swagger/sample</sourceFolder>--> <sourceFolder>src/main/java/net</sourceFolder>
<!-- </configOptions>--> </configOptions>
<!-- </configuration>--> </configuration>
<!-- </execution>--> </execution>
<!-- </executions>--> </executions>
<!-- </plugin>--> </plugin>
<plugin> <plugin>
<groupId>io.swagger.core.v3</groupId> <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId> <artifactId>swagger-maven-plugin</artifactId>
......
...@@ -29,7 +29,7 @@ public class Dog { ...@@ -29,7 +29,7 @@ public class Dog {
@Operation(summary = "Delete user", @Operation(summary = "Delete user",
description = "This can only be done by the logged in user.") description = "This can only be done by the logged in user.")
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(responseCode = "100", description = "user deteled"), @ApiResponse(responseCode = "100", description = "dog deleted"),
@ApiResponse(responseCode = "101", description = "Invalid username supplied"), @ApiResponse(responseCode = "101", description = "Invalid username supplied"),
@ApiResponse(responseCode = "102", description = "User not found")}) @ApiResponse(responseCode = "102", description = "User not found")})
public Response addDog( public Response addDog(
......
...@@ -23,10 +23,10 @@ public class CatResource { ...@@ -23,10 +23,10 @@ public class CatResource {
@POST @POST
@Consumes("application/json") @Consumes("application/json")
@Operation(summary = "Delete cat", @Operation(summary = "Deletion of cat",
description = "This can be done by everyone.") description = "This can be done by everyone.")
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "user deteled"), @ApiResponse(responseCode = "200", description = "cat deleted"),
@ApiResponse(responseCode = "404", description = "Invalid username supplied"), @ApiResponse(responseCode = "404", description = "Invalid username supplied"),
@ApiResponse(responseCode = "405", description = "User not found")}) @ApiResponse(responseCode = "405", description = "User not found")})
public Response addCat( public Response addCat(
......
...@@ -29,7 +29,7 @@ public class PetResource { ...@@ -29,7 +29,7 @@ public class PetResource {
@Operation(summary = "Delete user", @Operation(summary = "Delete user",
description = "This can only be done by the logged in user.") description = "This can only be done by the logged in user.")
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "user deteled"), @ApiResponse(responseCode = "200", description = "pet deleted"),
@ApiResponse(responseCode = "400", description = "Invalid username supplied"), @ApiResponse(responseCode = "400", description = "Invalid username supplied"),
@ApiResponse(responseCode = "402", description = "User not found")}) @ApiResponse(responseCode = "402", description = "User not found")})
public Response addPet( public Response addPet(
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<parent> <parent>
<artifactId>EVSClient</artifactId> <artifactId>EVSClient</artifactId>
<groupId>net.ihe.gazelle</groupId> <groupId>net.ihe.gazelle</groupId>
<version>5.13.3-SNAPSHOT</version> <version>5.13.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <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"}}}}} {"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 \ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.ihe.gazelle</groupId> <groupId>net.ihe.gazelle</groupId>
<artifactId>EVSClient</artifactId> <artifactId>EVSClient</artifactId>
<version>5.13.3-SNAPSHOT</version> <version>5.13.5-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>EVSClient</name> <name>EVSClient</name>
<description>EVSClient project, External Validation Service Front-end</description> <description>EVSClient project, External Validation Service Front-end</description>
...@@ -222,13 +222,13 @@ ...@@ -222,13 +222,13 @@
<dependency> <dependency>
<groupId>net.ihe.gazelle</groupId> <groupId>net.ihe.gazelle</groupId>
<artifactId>EVSClient-ejb</artifactId> <artifactId>EVSClient-ejb</artifactId>
<version>5.13.3-SNAPSHOT</version> <version>5.13.5-SNAPSHOT</version>
<type>ejb</type> <type>ejb</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.ihe.gazelle</groupId> <groupId>net.ihe.gazelle</groupId>
<artifactId>EVSClient-ui</artifactId> <artifactId>EVSClient-ui</artifactId>
<version>5.13.3-SNAPSHOT</version> <version>5.13.5-SNAPSHOT</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<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