Migrate to OpenAPI (#3206)
* Migrate to OpenAPI * Update spring * Test fix
This commit is contained in:
parent
20f3420397
commit
aa09e59255
|
@ -4,6 +4,7 @@
|
|||
title: "The version of a few dependencies have been bumped to the latest versions
|
||||
(dependent HAPI modules listed in brackets):
|
||||
<ul>
|
||||
<li>Spring (JPA): 5.3.7 -> 5.3.13</li>
|
||||
<li>Thymeleaf (Testpage Overlay): 3.0.12.RELEASE -> 3.0.13.RELEASE (Addresses CVE-2021-43466)</li>
|
||||
</ul>
|
||||
"
|
||||
|
|
|
@ -197,8 +197,8 @@
|
|||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -27,15 +27,14 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("Represents an NPM package metadata response")
|
||||
@Schema(description = "Represents an NPM package metadata response")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public class NpmPackageMetadataJson {
|
||||
|
@ -108,7 +107,7 @@ public class NpmPackageMetadataJson {
|
|||
private String myDescription;
|
||||
@JsonProperty("fhirVersion")
|
||||
private String myFhirVersion;
|
||||
@ApiModelProperty(value = "The size of this package in bytes", example = "1000")
|
||||
@Schema(description = "The size of this package in bytes", example = "1000")
|
||||
@JsonProperty("_bytes")
|
||||
private long myBytes;
|
||||
|
||||
|
|
|
@ -23,13 +23,12 @@ package ca.uhn.fhir.jpa.packages;
|
|||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("Represents an NPM package search response")
|
||||
@Schema(description = "Represents an NPM package search response")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public class NpmPackageSearchResultJson {
|
||||
|
@ -95,7 +94,7 @@ public class NpmPackageSearchResultJson {
|
|||
private String myDescription;
|
||||
@JsonProperty("fhirVersion")
|
||||
private List<String> myFhirVersion;
|
||||
@ApiModelProperty(value = "The size of this package in bytes", example = "1000")
|
||||
@Schema(description = "The size of this package in bytes", example = "1000")
|
||||
@JsonProperty("_bytes")
|
||||
private long myBytes;
|
||||
|
||||
|
|
|
@ -23,12 +23,12 @@ package ca.uhn.fhir.jpa.packages;
|
|||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("Represents an NPM package deletion response")
|
||||
@Schema(description = "Represents an NPM package deletion response")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public class PackageDeleteOutcomeJson {
|
||||
|
|
|
@ -23,14 +23,14 @@ package ca.uhn.fhir.jpa.packages;
|
|||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("Represents an NPM package installation response")
|
||||
@Schema(description = "Represents an NPM package installation response")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public class PackageInstallOutcomeJson {
|
||||
|
|
|
@ -27,15 +27,14 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
|||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@ApiModel(
|
||||
value = "PackageInstallationSpec",
|
||||
@Schema(
|
||||
name = "PackageInstallationSpec",
|
||||
description =
|
||||
"Defines a set of instructions for package installation"
|
||||
)
|
||||
|
@ -47,25 +46,25 @@ import java.util.function.Supplier;
|
|||
@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE, fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public class PackageInstallationSpec {
|
||||
|
||||
@ApiModelProperty("The direct package URL")
|
||||
@Schema(description = "The direct package URL")
|
||||
@JsonProperty("packageUrl")
|
||||
private String myPackageUrl;
|
||||
@ApiModelProperty("The NPM package Name")
|
||||
@Schema(description = "The NPM package Name")
|
||||
@JsonProperty("name")
|
||||
private String myName;
|
||||
@ApiModelProperty("The direct package version")
|
||||
@Schema(description = "The direct package version")
|
||||
@JsonProperty("version")
|
||||
private String myVersion;
|
||||
@ApiModelProperty("Should resources from this package be extracted from the package and installed into the repository individually")
|
||||
@Schema(description = "Should resources from this package be extracted from the package and installed into the repository individually")
|
||||
@JsonProperty("installMode")
|
||||
private InstallModeEnum myInstallMode;
|
||||
@ApiModelProperty("If resources are being installed individually, this is list provides the resource types to install. By default, all conformance resources will be installed.")
|
||||
@Schema(description = "If resources are being installed individually, this is list provides the resource types to install. By default, all conformance resources will be installed.")
|
||||
@JsonProperty("installResourceTypes")
|
||||
private List<String> myInstallResourceTypes;
|
||||
@ApiModelProperty("Should dependencies be automatically resolved, fetched and installed with the same settings")
|
||||
@Schema(description = "Should dependencies be automatically resolved, fetched and installed with the same settings")
|
||||
@JsonProperty("fetchDependencies")
|
||||
private boolean myFetchDependencies;
|
||||
@ApiModelProperty("Any values provided here will be interpreted as a regex. Dependencies with an ID matching any regex will be skipped.")
|
||||
@Schema(description = "Any values provided here will be interpreted as a regex. Dependencies with an ID matching any regex will be skipped.")
|
||||
private List<String> myDependencyExcludes;
|
||||
@JsonIgnore
|
||||
private byte[] myPackageContents;
|
||||
|
|
27
pom.xml
27
pom.xml
|
@ -833,7 +833,7 @@
|
|||
<servicemix_xmlresolver_version>1.2_5</servicemix_xmlresolver_version>
|
||||
<slf4j_version>1.7.30</slf4j_version>
|
||||
<log4j_to_slf4j_version>2.11.1</log4j_to_slf4j_version>
|
||||
<spring_version>5.3.7</spring_version>
|
||||
<spring_version>5.3.13</spring_version>
|
||||
<spring_data_version>2.5.0</spring_data_version>
|
||||
<spring_batch_version>4.3.3</spring_batch_version>
|
||||
<spring_boot_version>2.5.0</spring_boot_version>
|
||||
|
@ -1169,11 +1169,6 @@
|
|||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
|
@ -1189,6 +1184,11 @@
|
|||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.24</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
<version>1.5.13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
|
@ -1756,6 +1756,11 @@
|
|||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring_version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-expression</artifactId>
|
||||
<version>${spring_version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
|
@ -1786,6 +1791,11 @@
|
|||
<artifactId>spring-test</artifactId>
|
||||
<version>${spring_version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${spring_version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
|
@ -1806,11 +1816,6 @@
|
|||
<artifactId>spring-web</artifactId>
|
||||
<version>${spring_version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${spring_version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-websocket</artifactId>
|
||||
|
|
Loading…
Reference in New Issue