mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
add operation id option (#17750)
This commit is contained in:
@@ -436,6 +436,13 @@ Not all generators support thess features yet. Please give it a try to confirm t
|
||||
|
||||
NOTE: some generators use `baseName` (original name obtained direclty from OpenAPI spec, e.g. `shipping-date`) mustache tag in the templates so the mapping feature won't work.
|
||||
|
||||
To map `operationId` (used in method naming) to something else, use `operationIdNameMappings` option, e.g.
|
||||
|
||||
```sh
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/java/ --operation-id-name-mappings getPetById=returnPetById
|
||||
```
|
||||
will name the API method as `returnPetById` instead of `getPetById` obtained from OpenAPI doc/spec.
|
||||
|
||||
## Schema Mapping
|
||||
|
||||
One can map the schema to something else (e.g. external objects/models outside of the package) using the `schemaMappings` option, e.g. in CLI
|
||||
|
||||
Reference in New Issue
Block a user