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

Add schema based validation for request data #1778

Open
marclave opened this issue May 18, 2024 · 2 comments
Open

Add schema based validation for request data #1778

marclave opened this issue May 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@marclave
Copy link
Member

marclave commented May 18, 2024

What happens?

we currently dont format any types in the inputs based on the spec https://swagger.io/docs/specification/data-models/data-types/

Required Changes:

  • When a specification file is loaded we save any request schemas to the workspace and reference them
  • When entering request data the inputs should be validated against the schemas

Considerations:

  • When creating a new request how do we define the schema? (link vs direct entering)
  • How do we handle no schema (likely just fallback to an "any" schema that we always have in the workspace)
@marclave marclave added the bug Something isn't working label May 18, 2024
@hanspagel
Copy link
Member

Sorry, I’m missing some context. If someone passes strong (instead of string) we throw an error? Or show a warning?

@marclave marclave changed the title format openapi types format openapi types inside of api client inputs May 18, 2024
@marclave
Copy link
Member Author

Sorry, I’m missing some context. If someone passes strong (instead of string) we throw an error? Or show a warning?

yeah inside of the openapi client inputs we can do some form of validation based on the formats :)

@linear linear bot changed the title format openapi types inside of api client inputs Add schema based validation for request data May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants