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

A catbuffer-generator should be used to avoid duplicated structures #281

Open
segfaultxavi opened this issue Sep 1, 2021 · 3 comments
Open

Comments

@segfaultxavi
Copy link
Collaborator

Things like EntityDTO are already described in a catbuffer-schema.

We could avoid this redundancy by generating parts of the OpenAPI spec from the schemas using an openapi-generator. In this way we keep a single source of truth.

As a bonus, that would import the docs too \o/

@fboucquez
Copy link
Contributor

fboucquez commented Sep 1, 2021

This issue is related to https://github.com/symbol/catbuffer-schemas/issues/2

I did a bit of research, catbuffer schemas don't match the mongo collections completely, and the open API spec follows the mongo collections, not the catbuffer schemas. You will have mismatches as described in the schema issue

@segfaultxavi
Copy link
Collaborator Author

Ah, nice to see there's already some research into this!

I'll continue the discussion there.

@fboucquez
Copy link
Contributor

fboucquez commented Sep 1, 2021

Maybe we can generate the basic types or some entities, and manually create the mismatched ones. Also, there is information not found in catbuffer that can appear in open API, for example, the meta fields.

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

No branches or pull requests

2 participants