Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions docs/generators/spring.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalAcceptNullable|Use `ofNullable` instead of just `of` to accept null values when using Optional.| |true|
|paginatedReturnType|Set container type to use for collection responses when the operation has vendor extension `x-spring-paginated`. Applies only to collection responses.|<dl><dt>**LIST**</dt><dd>Keep using `java.util.List` for collection responses (default).</dd><dt>**SLICE**</dt><dd>Use `org.springframework.data.domain.Slice` for collection responses when `x-spring-paginated` is enabled.</dd><dt>**PAGE**</dt><dd>Use `org.springframework.data.domain.Page` for collection responses when `x-spring-paginated` is enabled.</dd></dl>|LIST|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down Expand Up @@ -112,24 +113,24 @@ These options may be applied as additional-properties (cli) or configOptions (pl

## SUPPORTED VENDOR EXTENSIONS

| Extension name | Description | Applicable for | Default value |
| -------------- | ----------- | -------------- | ------------- |
|x-discriminator-value|Used with model inheritance to specify value for discriminator that identifies current model|MODEL|
|x-implements|Ability to specify interfaces that model must implements|MODEL|empty array
|x-setter-extra-annotation|Custom annotation that can be specified over java setter for specific field|FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
|x-tags|Specify multiple swagger tags for operation|OPERATION|null
|x-accepts|Specify custom value for 'Accept' header for operation|OPERATION|null
|x-content-type|Specify custom value for 'Content-Type' header for operation|OPERATION|null
|x-class-extra-annotation|List of custom annotations to be added to model|MODEL|null
|x-field-extra-annotation|List of custom annotations to be added to property|FIELD, OPERATION_PARAMETER|null
|x-operation-extra-annotation|List of custom annotations to be added to operation|OPERATION|null
|x-spring-paginated|Add `org.springframework.data.domain.Pageable` to controller method. Can be used to handle `page`, `size` and `sort` query parameters. If these query parameters are also specified in the operation spec, they will be removed from the controller method as their values can be obtained from the `Pageable` object.|OPERATION|false
|x-version-param|Marker property that tells that this parameter would be used for endpoint versioning. Applicable for headers & query params. true/false|OPERATION_PARAMETER|null
|x-pattern-message|Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable|FIELD, OPERATION_PARAMETER|null
|x-size-message|Add this property whenever you need to customize the invalidation error message for the size or length of a variable|FIELD, OPERATION_PARAMETER|null
|x-minimum-message|Add this property whenever you need to customize the invalidation error message for the minimum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-maximum-message|Add this property whenever you need to customize the invalidation error message for the maximum value of a variable|FIELD, OPERATION_PARAMETER|null
|x-spring-api-version|Value for 'version' attribute in @RequestMapping (for Spring 7 and above).|OPERATION|null
| Extension name | Description | Applicable for | Default value |
| -------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -------------- | ------------- |
|x-discriminator-value| Used with model inheritance to specify value for discriminator that identifies current model |MODEL|
|x-implements| Ability to specify interfaces that model must implements |MODEL|empty array
|x-setter-extra-annotation| Custom annotation that can be specified over java setter for specific field |FIELD|When field is array & uniqueItems, then this extension is used to add `@JsonDeserialize(as = LinkedHashSet.class)` over setter, otherwise no value
|x-tags| Specify multiple swagger tags for operation |OPERATION|null
|x-accepts| Specify custom value for 'Accept' header for operation |OPERATION|null
|x-content-type| Specify custom value for 'Content-Type' header for operation |OPERATION|null
|x-class-extra-annotation| List of custom annotations to be added to model |MODEL|null
|x-field-extra-annotation| List of custom annotations to be added to property |FIELD, OPERATION_PARAMETER|null
|x-operation-extra-annotation| List of custom annotations to be added to operation |OPERATION|null
|x-spring-paginated| Add `org.springframework.data.domain.Pageable` to controller method. Can be used to handle `page`, `size` and `sort` query parameters. If these query parameters are also specified in the operation spec, they will be removed from the controller method as their values can be obtained from the `Pageable` object. Can be modified with paginatedReturnType configOption |OPERATION|false
|x-version-param| Marker property that tells that this parameter would be used for endpoint versioning. Applicable for headers & query params. true/false |OPERATION_PARAMETER|null
|x-pattern-message| Add this property whenever you need to customize the invalidation error message for the regex pattern of a variable |FIELD, OPERATION_PARAMETER|null
|x-size-message| Add this property whenever you need to customize the invalidation error message for the size or length of a variable |FIELD, OPERATION_PARAMETER|null
|x-minimum-message| Add this property whenever you need to customize the invalidation error message for the minimum value of a variable |FIELD, OPERATION_PARAMETER|null
|x-maximum-message| Add this property whenever you need to customize the invalidation error message for the maximum value of a variable |FIELD, OPERATION_PARAMETER|null
|x-spring-api-version| Value for 'version' attribute in @RequestMapping (for Spring 7 and above). |OPERATION|null


## IMPORT MAPPING
Expand Down
Loading
Loading