OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
parameters:
- name: sid
in: path
description: SID of the user
required: true
schema:
$ref: './common.yaml#/components/schemas/sid
The service stub generated has parameter "sid" defined as object, as shown below:
addUser(@ApiParam(value = "SID of user",required=true) @PathParam("sid") Object sid,....)
This throws Jersey Model validation errors while running the service.
I changed the type of the parameter to "string" and the service works fine. Is there any way code/class for such parameter (with patterns/regular expressions) can be generated and referenced ?
openapi-generator version
openapi-generator maven plugin, version 3.1.2
OpenAPI declaration file content or url
Command line used for generation
jaxrs-jersey
Steps to reproduce
specification example provided above
Related issues/PRs
Suggest a fix/enhancement
For parameters in URI path, can we fallback to String (instead of Object) in case the relevant type cannot be generated ?
Description
We have a type defined as string along-with pattern
This is referenced as a parameter in POST method:
The service stub generated has parameter "sid" defined as object, as shown below:
addUser(@ApiParam(value = "SID of user",required=true) @PathParam("sid") Object sid,....)
This throws Jersey Model validation errors while running the service.
I changed the type of the parameter to "string" and the service works fine. Is there any way code/class for such parameter (with patterns/regular expressions) can be generated and referenced ?
openapi-generator version
openapi-generator maven plugin, version 3.1.2
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
specification example provided above
Related issues/PRs
Suggest a fix/enhancement
For parameters in URI path, can we fallback to String (instead of Object) in case the relevant type cannot be generated ?