OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.83k stars 6.58k forks source link

[REQ] Generate all components not just those used by services #2483

Open msillence opened 5 years ago

msillence commented 5 years ago

Is your feature request related to a problem? Please describe.

We have services in two places that include the same domain objects We want to generate all the domain objects even if we don't have a service definition that uses them

Describe the solution you'd like

We slit out our service and domain definitions generating all the domain objects not not necessarily all the service definitions we use the $ref to refer to the definitions in the other file $ref: 'domain-core.yaml#/components/schemas/DomainObject

we'd like to be able to generate all the domain objects in that other file

Describe alternatives you've considered

We are considering generating a dummy service file that references all objects

Additional context

Our domain objects and services are used in multiple systems we'd like a single source of these domain objects even if they are only used internally by some systems or exposed in a different way to our main services.

borsch commented 4 years ago

+1

wing328 commented 4 years ago

I think this feature request should log in the Swagger Parser repo instead as OpenAPI Generator relies on Swagger Parser to parse the spec at the moment.

borsch commented 4 years ago

@wing328 what exacly swagger parser is used? https://github.com/OpenAPITools/swagger-parser or https://github.com/swagger-api/swagger-parser ?

wing328 commented 4 years ago

https://github.com/swagger-api/swagger-parser

(We filed some PRs to https://github.com/swagger-api/swagger-parser before and since it took some time to review, we were using https://github.com/OpenAPITools/swagger-parser before those PRs got merged)

ManuelTS commented 2 years ago

+1, would it make sense to provide a config for all other schemas too? Meaning request, response, ... schemas?

RobertCer commented 1 year ago

Any news?

pontus-eliason commented 9 months ago

Any update on this?

SteveGazzoJr commented 6 months ago

also pinging this issue for an update plz && ty