forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin' into 7.0.x
This commit is contained in:
@@ -61,7 +61,7 @@ Mono<Order> StoreController.getOrderById(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
|
||||
### Parameters
|
||||
Name | Type | Description | Notes
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<micronaut.version>3.4.3</micronaut.version>
|
||||
<exec.mainClass>org.openapitools.Application</exec.mainClass>
|
||||
<micronaut.runtime>netty</micronaut.runtime>
|
||||
<swagger-annotations-version>2.2.0</swagger-annotations-version>
|
||||
<swagger-annotations-version>2.2.7</swagger-annotations-version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
|
||||
@@ -217,6 +217,8 @@ public class PetController {
|
||||
*
|
||||
* @param pet Pet object that needs to be added to the store (required)
|
||||
* @return Pet
|
||||
* API documentation for the updatePet operation
|
||||
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
|
||||
*/
|
||||
@Operation(
|
||||
operationId = "updatePet",
|
||||
|
||||
@@ -94,7 +94,7 @@ public class StoreController {
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
*
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return Order
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Category {
|
||||
* @return id
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "id", required = false)
|
||||
@Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Long getId() {
|
||||
@@ -77,7 +77,7 @@ public class Category {
|
||||
**/
|
||||
@Nullable
|
||||
@Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
|
||||
@Schema(name = "name", required = false)
|
||||
@Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getName() {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ModelApiResponse {
|
||||
* @return code
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "code", required = false)
|
||||
@Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_CODE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Integer getCode() {
|
||||
@@ -81,7 +81,7 @@ public class ModelApiResponse {
|
||||
* @return type
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "type", required = false)
|
||||
@Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_TYPE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getType() {
|
||||
@@ -104,7 +104,7 @@ public class ModelApiResponse {
|
||||
* @return message
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "message", required = false)
|
||||
@Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_MESSAGE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getMessage() {
|
||||
|
||||
@@ -104,7 +104,7 @@ public class Order {
|
||||
* @return id
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "id", required = false)
|
||||
@Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Long getId() {
|
||||
@@ -127,7 +127,7 @@ public class Order {
|
||||
* @return petId
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "petId", required = false)
|
||||
@Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_PET_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Long getPetId() {
|
||||
@@ -150,7 +150,7 @@ public class Order {
|
||||
* @return quantity
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "quantity", required = false)
|
||||
@Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_QUANTITY)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Integer getQuantity() {
|
||||
@@ -173,7 +173,7 @@ public class Order {
|
||||
* @return shipDate
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "shipDate", required = false)
|
||||
@Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_SHIP_DATE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX")
|
||||
@@ -198,7 +198,7 @@ public class Order {
|
||||
* @return status
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "status", description = "Order Status", required = false)
|
||||
@Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_STATUS)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public StatusEnum getStatus() {
|
||||
@@ -221,7 +221,7 @@ public class Order {
|
||||
* @return complete
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "complete", required = false)
|
||||
@Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_COMPLETE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Boolean getComplete() {
|
||||
|
||||
@@ -109,7 +109,7 @@ public class Pet {
|
||||
* @return id
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "id", required = false)
|
||||
@Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Long getId() {
|
||||
@@ -133,7 +133,7 @@ public class Pet {
|
||||
**/
|
||||
@Valid
|
||||
@Nullable
|
||||
@Schema(name = "category", required = false)
|
||||
@Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_CATEGORY)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Category getCategory() {
|
||||
@@ -156,7 +156,7 @@ public class Pet {
|
||||
* @return name
|
||||
**/
|
||||
@NotNull
|
||||
@Schema(name = "name", example = "doggie", required = true)
|
||||
@Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||
public String getName() {
|
||||
@@ -184,7 +184,7 @@ public class Pet {
|
||||
* @return photoUrls
|
||||
**/
|
||||
@NotNull
|
||||
@Schema(name = "photoUrls", required = true)
|
||||
@Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
|
||||
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||
public List<String> getPhotoUrls() {
|
||||
@@ -215,7 +215,7 @@ public class Pet {
|
||||
* @return tags
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "tags", required = false)
|
||||
@Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_TAGS)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public List<Tag> getTags() {
|
||||
@@ -238,7 +238,7 @@ public class Pet {
|
||||
* @return status
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "status", description = "pet status in the store", required = false)
|
||||
@Schema(name = "status", description = "pet status in the store", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_STATUS)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public StatusEnum getStatus() {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Tag {
|
||||
* @return id
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "id", required = false)
|
||||
@Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Long getId() {
|
||||
@@ -76,7 +76,7 @@ public class Tag {
|
||||
* @return name
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "name", required = false)
|
||||
@Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getName() {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class User {
|
||||
* @return id
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "id", required = false)
|
||||
@Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Long getId() {
|
||||
@@ -100,7 +100,7 @@ public class User {
|
||||
* @return username
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "username", required = false)
|
||||
@Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_USERNAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getUsername() {
|
||||
@@ -123,7 +123,7 @@ public class User {
|
||||
* @return firstName
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "firstName", required = false)
|
||||
@Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_FIRST_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getFirstName() {
|
||||
@@ -146,7 +146,7 @@ public class User {
|
||||
* @return lastName
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "lastName", required = false)
|
||||
@Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_LAST_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getLastName() {
|
||||
@@ -169,7 +169,7 @@ public class User {
|
||||
* @return email
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "email", required = false)
|
||||
@Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_EMAIL)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getEmail() {
|
||||
@@ -192,7 +192,7 @@ public class User {
|
||||
* @return password
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "password", required = false)
|
||||
@Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_PASSWORD)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getPassword() {
|
||||
@@ -215,7 +215,7 @@ public class User {
|
||||
* @return phone
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "phone", required = false)
|
||||
@Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_PHONE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public String getPhone() {
|
||||
@@ -238,7 +238,7 @@ public class User {
|
||||
* @return userStatus
|
||||
**/
|
||||
@Nullable
|
||||
@Schema(name = "userStatus", description = "User Status", required = false)
|
||||
@Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty(JSON_PROPERTY_USER_STATUS)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public Integer getUserStatus() {
|
||||
|
||||
@@ -127,7 +127,7 @@ class StoreControllerSpec extends Specification {
|
||||
*
|
||||
* The method should: Find purchase order by ID
|
||||
*
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
|
||||
*
|
||||
* TODO fill in the parameters and test return value.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user