You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of an existing campaign to generate clients off of specs, we'd like to generate new APIs in the python client from an OpenAPI spec. The current generator makes use of the legacy rest-api-spec that is published in core opensearch. There are other initiatives that will convert the rest-api-spec into OpenAPI specs through a translation layer, but for the purposes of this client we'd like to do a re-write on the existing generator to inject OpenAPI.
What solution would you like?
A rewrite of the current generator to ingest OpenAPI specs and output API endpoints into the client.
What alternatives have you considered?
Some alternatives could be to make use of the existing rest-api-spec and continue using the generator as is. But this is out of the scope of consideration as the spec was written to suit a particular use-case that is no longer relevant. OpenAPI specs are the industry standard for JSON based schemas. We've already seen an experimental schema + generator written for the OpenSearch-Java client[1] that replicates what we intend to do for the python client.
Another alternative would be to use the built in generator from either OpenAPI[2] or an accompanying python specific generator written for the OpenAPI spec[3]. This approach has drawbacks in the sense that they are not customizable to our needs. The current API layer is heavily opinionated in the way it is written, and using a generator from scratch would mean a lot of breaking changes in the function signatures, imports, tests, etc. We would like the initial approach to remain as close to the current API model as possible, and allow for a gradual overhaul of all the missing APIs and methods. Re-wiring the current generator allows us to do just that.
Is your feature request related to a problem?
As part of an existing campaign to generate clients off of specs, we'd like to generate new APIs in the python client from an OpenAPI spec. The current generator makes use of the legacy rest-api-spec that is published in core opensearch. There are other initiatives that will convert the rest-api-spec into OpenAPI specs through a translation layer, but for the purposes of this client we'd like to do a re-write on the existing generator to inject OpenAPI.
What solution would you like?
A rewrite of the current generator to ingest OpenAPI specs and output API endpoints into the client.
What alternatives have you considered?
Some alternatives could be to make use of the existing rest-api-spec and continue using the generator as is. But this is out of the scope of consideration as the spec was written to suit a particular use-case that is no longer relevant. OpenAPI specs are the industry standard for JSON based schemas. We've already seen an experimental schema + generator written for the OpenSearch-Java client[1] that replicates what we intend to do for the python client.
Another alternative would be to use the built in generator from either OpenAPI[2] or an accompanying python specific generator written for the OpenAPI spec[3]. This approach has drawbacks in the sense that they are not customizable to our needs. The current API layer is heavily opinionated in the way it is written, and using a generator from scratch would mean a lot of breaking changes in the function signatures, imports, tests, etc. We would like the initial approach to remain as close to the current API model as possible, and allow for a gradual overhaul of all the missing APIs and methods. Re-wiring the current generator allows us to do just that.
Do you have any additional context?
[1] opensearch-project/opensearch-java#366
[2] https://github.com/OpenAPITools/openapi-generator
[3] https://github.com/MarcoMuellner/openapi-python-generator
The text was updated successfully, but these errors were encountered: