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

[Core] Add in-house JSON Schema implementation #195

Open
AmadeusK525 opened this issue Aug 23, 2023 · 0 comments
Open

[Core] Add in-house JSON Schema implementation #195

AmadeusK525 opened this issue Aug 23, 2023 · 0 comments
Labels
core core and sdk related issues enhancement New feature or request

Comments

@AmadeusK525
Copy link
Contributor

We're currently handling JSON Schemas via kinopenapi's implementation. This isn't always desireable because it's hard to customize an external lib, there are some fields that aren't important to us, etc.

This has been causing some issues. For instance: we create schemas based on Go structs with the jsonschema lib, but we need to avoid any refs/defs because when transforming the resulting schema into the kinopenapi.Schema, we're not able to resolve the references. Thus, if we try to create a schema based on a struct that has a field of a schema, infinite recursion happens, since we're always trying to expand the resulting Schema completely. This would be the case for any types that reference themselves or have fields of types that reference themselves.

When creating our own implementation, we can more accurately specify how to transform between different implementations and avoid those problems. It'll also be a nice centralized way of having a single source of truth for JSON Schemas, not tied to any particular lib (like the openapi lib).

We also need to handle schema validation

@AmadeusK525 AmadeusK525 added enhancement New feature or request core core and sdk related issues labels Aug 23, 2023
@AmadeusK525 AmadeusK525 self-assigned this Aug 24, 2023
@hspedro hspedro modified the milestones: D3, D4 Aug 24, 2023
@AmadeusK525 AmadeusK525 removed their assignment Sep 11, 2023
@AmadeusK525 AmadeusK525 removed this from the D4 milestone Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core core and sdk related issues enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants