Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROPOSAL] Bootstrap API specification from OpenSearch code #30

Closed
dblock opened this issue Mar 21, 2022 · 4 comments
Closed

[PROPOSAL] Bootstrap API specification from OpenSearch code #30

dblock opened this issue Mar 21, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@dblock
Copy link
Member

dblock commented Mar 21, 2022

What kind of business use case are you trying to solve? What are your requirements?

Looking at the early PRs on this repository it looks like we are hand-creating/editing API specifications. Is that something that could be generated out of OpenSearch code? At least as a bootstrap? This is one half of opensearch-project/OpenSearch#3090.

What is the problem? What is preventing you from meeting the requirements?

The amount of work that will be required to write the models/APIs will be significant and potentially error-prone. It doesn't scale. Every time an API changes we will need to remember to update the specification, by hand. We need to turn this around and generate the RESTful implementation from this spec, which is opensearch-project/OpenSearch#3090.

What are you proposing? What do you suggest we do to solve the problem or improve the existing situation?

Until we start doing opensearch-project/OpenSearch#3090, bootstrap the api specification from source

@dtaivpp
Copy link

dtaivpp commented Apr 27, 2022

@dblock Is the idea here to auto-generate smithy and then convert that to OpenAPI or something along those lines? I am not seeing a whole lot of support for code generation into other languages from smithy.

@dblock
Copy link
Member Author

dblock commented Apr 27, 2022

@dblock Is the idea here to auto-generate smithy and then convert that to OpenAPI or something along those lines? I am not seeing a whole lot of support for code generation into other languages from smithy.

That's one idea.

@dblock dblock changed the title [PROPOSAL] Generate API specification from OpenSearch code [PROPOSAL] Bootstrap API specification from OpenSearch code May 18, 2022
@dblock
Copy link
Member Author

dblock commented May 18, 2022

I am going to close this to avoid confusion. What we want is to write the spec once (this repo), then generate both the RESTful API (opensearch-project/OpenSearch#3090) and the clients (opensearch-project/opensearch-clients#19) from spec.

@dblock dblock closed this as completed May 18, 2022
@dblock
Copy link
Member Author

dblock commented May 18, 2022

@dblock Is the idea here to auto-generate smithy and then convert that to OpenAPI or something along those lines? I am not seeing a whole lot of support for code generation into other languages from smithy.

Note #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants