Reputation: 175
I'm using the OpenAPI generator gradle plugin with the "jaxrs-resteasy" generator and I was wondering if there was a way to change the name of the output files. Right now it's producing ApiApi.java, ApiApiService.java, ApiException.java etc.
Is there way to configure that so the output would be MyNameApi.java and MyNameApiService.java?
Example YAML:
paths:
/api/test/myname
get:
tags:
- myname
summary: Some summary
parameters:
- in: query
name: firstName
schema:
type: string
required: true
description: Description holder
Upvotes: 3
Views: 1583
Reputation: 109
It looks like they have a PR up to add support for tags in resteasy
https://github.com/OpenAPITools/openapi-generator/pull/6130
Edit: Actually this looks like this is support for the useTags config option in resteasy
Upvotes: 0
Reputation: 10807
One way is to use tags
in the OpenAPI spec to control how the files are named. For example,
paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
This should generate PetApi.java and PetApiServices.java.
Upvotes: 1