Skip to content

Commit

Permalink
Swagger UI for production (#254)
Browse files Browse the repository at this point in the history
* upgrade to model springdoc, make swagger-ui ready for production

start to solve compilation issues

migrate to spring-doc, tested with reverse proxy, logo reintegrated

reintegrate other swagger-ui customization

sort end-points in swagger-ui, make * Accept header work, start to fix contextPath for references

return application/json for Accept:text/html, have reference url work behind reverse proxy

add forgotten files

* operation is not permitted so I remove it for now

---------

Co-authored-by: thomas loubrieu <[email protected]>
  • Loading branch information
tloubrieu-jpl and thomas loubrieu authored Mar 2, 2023
1 parent 03e3b64 commit 13039aa
Show file tree
Hide file tree
Showing 44 changed files with 1,178 additions and 1,351 deletions.
54 changes: 33 additions & 21 deletions model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,28 @@
<build>
<plugins>
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.20</version>

<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>6.3.0</version>
<executions>
<execution>
<id>generate-swagger-javacode</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/swagger.yml</inputSpec>
<language>spring</language>
<generatorName>spring</generatorName>
<withXml>true</withXml>
<configOptions>
<sourceFolder>src/gen/java/main</sourceFolder>
<dateLibrary>joda</dateLibrary>
<modelPackage>gov.nasa.pds.model</modelPackage>
<apiPackage>gov.nasa.pds.api.base</apiPackage>
<generateSupportingFiles>false</generateSupportingFiles>
<interfaceOnly>false</interfaceOnly>
<sourceFolder>src/main/java</sourceFolder>
<dateLibrary>joda</dateLibrary>
<documentationProvider>springdoc</documentationProvider>
<licenseName>apache-2</licenseName>
<modelPackage>gov.nasa.pds.model</modelPackage>
<apiPackage>gov.nasa.pds.api.base</apiPackage>
<generateSupportingFiles>false</generateSupportingFiles>
<interfaceOnly>false</interfaceOnly>
</configOptions>

</configuration>
Expand All @@ -103,14 +103,7 @@
</plugins>
</build>

<dependencies>
<!-- dependencies are needed for the client being generated -->
<!--SpringFox dependencies -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${springfox-version}</version>
</dependency>
<dependencies>

<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
<dependency>
Expand Down Expand Up @@ -206,6 +199,12 @@
<version>2.12.5</version>
</dependency>

<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>0.2.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/joda-time/joda-time -->
<dependency>
<groupId>joda-time</groupId>
Expand All @@ -222,6 +221,19 @@
<version>1.4.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.8</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-models -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models</artifactId>
<version>2.2.8</version>
</dependency>

</dependencies>

Expand Down
Loading

0 comments on commit 13039aa

Please sign in to comment.