-
Notifications
You must be signed in to change notification settings - Fork 222
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
request_body type in #[path] is not required to exist #500
Labels
enhancement
New feature or request
Comments
Yeah, currently there is no validation of any sort regarding the input value. Though this could be improved absolutely. I am currently working on related functionalities so I can take a look at this as well soon. |
Related #801 |
juhaku
added a commit
that referenced
this issue
Sep 2, 2024
This will affect in all places where schema is being rendered. These are `value_type = ..` `request_body`, `response_body = ...` to name few. This is still very much work in progress but aims to enforce `PartialSchema` implementation for every type that is being used in OpenAPI spec generated by utoipa. The `Schema` trait will be split to `PartialSchema` and `Schema` and `Schema` will extend the `PartialSchema` trait. `PartialSchema` will provide the actual schema and `Schema` will provide name and other data related to the schema itself. This is useful since we already provide `PartialSchema` implementation for many standard Rust types and not all types need the full schema but only the schema definition. This makes schema definition implementation easier by juts allowing users to manually implement `PartialSchema` type for their type if needed. Still as usual the implementation can be automatically derived with `ToSchema` derive trait. Fixes #500 Fixes #801
juhaku
added a commit
that referenced
this issue
Sep 3, 2024
This will affect in all places where schema is being rendered. These are `value_type = ..` `request_body`, `response_body = ...` to name few. This aims to enforce `PartialSchema` implementation for every type that is being used in OpenAPI spec generated by utoipa. The `Schema` trait will be split to `PartialSchema` and `Schema` and `Schema` will extend the `PartialSchema` trait. `PartialSchema` will provide the actual schema and `Schema` will provide name and other data related to the schema itself. This is useful since we already provide `PartialSchema` implementation for many standard Rust types and not all types need the full schema but only the schema definition. This makes schema definition implementation easier by juts allowing users to manually implement `PartialSchema` type for their type if needed. Still as usual the implementation can be automatically derived with `ToSchema` derive trait. Fixes #500 Fixes #801
juhaku
added a commit
that referenced
this issue
Sep 3, 2024
This will affect in all places where schema is being rendered. These are `value_type = ..` `request_body`, `response_body = ...` to name few. This aims to enforce `PartialSchema` implementation for every type that is being used in OpenAPI spec generated by utoipa. The `Schema` trait will be split to `PartialSchema` and `Schema` and `Schema` will extend the `PartialSchema` trait. `PartialSchema` will provide the actual schema and `Schema` will provide name and other data related to the schema itself. This is useful since we already provide `PartialSchema` implementation for many standard Rust types and not all types need the full schema but only the schema definition. This makes schema definition implementation easier by juts allowing users to manually implement `PartialSchema` type for their type if needed. Still as usual the implementation can be automatically derived with `ToSchema` derive trait. Fixes #500 Fixes #801
juhaku
added a commit
that referenced
this issue
Sep 3, 2024
This will affect in all places where schema is being rendered. These are `value_type = ..` `request_body`, `response_body = ...` to name few. This aims to enforce `PartialSchema` implementation for every type that is being used in OpenAPI spec generated by utoipa. The `Schema` trait will be split to `PartialSchema` and `Schema` and `Schema` will extend the `PartialSchema` trait. `PartialSchema` will provide the actual schema and `Schema` will provide name and other data related to the schema itself. This is useful since we already provide `PartialSchema` implementation for many standard Rust types and not all types need the full schema but only the schema definition. This makes schema definition implementation easier by juts allowing users to manually implement `PartialSchema` type for their type if needed. Still as usual the implementation can be automatically derived with `ToSchema` derive trait. Fixes #500 Fixes #801
juhaku
added a commit
that referenced
this issue
Sep 3, 2024
This will affect in all places where schema is being rendered. These are `value_type = ..` `request_body`, `response_body = ...` to name few. This aims to enforce `PartialSchema` implementation for every type that is being used in OpenAPI spec generated by utoipa. The `Schema` trait will be split to `PartialSchema` and `Schema` and `Schema` will extend the `PartialSchema` trait. `PartialSchema` will provide the actual schema and `Schema` will provide name and other data related to the schema itself. This is useful since we already provide `PartialSchema` implementation for many standard Rust types and not all types need the full schema but only the schema definition. This makes schema definition implementation easier by juts allowing users to manually implement `PartialSchema` type for their type if needed. Still as usual the implementation can be automatically derived with `ToSchema` derive trait. Fixes #500 Fixes #801
juhaku
added a commit
that referenced
this issue
Sep 3, 2024
This will affect in all places where schema is being rendered. These are `value_type = ..` `request_body`, `response_body = ...` to name few. This aims to enforce `PartialSchema` implementation for every type that is being used in OpenAPI spec generated by utoipa. The `Schema` trait will be split to `PartialSchema` and `Schema` and `Schema` will extend the `PartialSchema` trait. `PartialSchema` will provide the actual schema and `Schema` will provide name and other data related to the schema itself. This is useful since we already provide `PartialSchema` implementation for many standard Rust types and not all types need the full schema but only the schema definition. This makes schema definition implementation easier by juts allowing users to manually implement `PartialSchema` type for their type if needed. Still as usual the implementation can be automatically derived with `ToSchema` derive trait. Fixes #500 Fixes #801
juhaku
added a commit
that referenced
this issue
Sep 3, 2024
This will affect in all places where schema is being rendered. These are `value_type = ..` `request_body`, `response_body = ...` to name few. This aims to enforce `PartialSchema` implementation for every type that is being used in OpenAPI spec generated by utoipa. The `Schema` trait will be split to `PartialSchema` and `Schema` and `Schema` will extend the `PartialSchema` trait. `PartialSchema` will provide the actual schema and `Schema` will provide name and other data related to the schema itself. This is useful since we already provide `PartialSchema` implementation for many standard Rust types and not all types need the full schema but only the schema definition. This makes schema definition implementation easier by juts allowing users to manually implement `PartialSchema` type for their type if needed. Still as usual the implementation can be automatically derived with `ToSchema` derive trait. Fixes #500 Fixes #801
juhaku
added a commit
that referenced
this issue
Sep 3, 2024
This will affect in all places where schema is being rendered. These are `value_type = ..` `request_body`, `response_body = ...` to name few. This aims to enforce `PartialSchema` implementation for every type that is being used in OpenAPI spec generated by utoipa. The `Schema` trait will be split to `PartialSchema` and `Schema` and `Schema` will extend the `PartialSchema` trait. `PartialSchema` will provide the actual schema and `Schema` will provide name and other data related to the schema itself. This is useful since we already provide `PartialSchema` implementation for many standard Rust types and not all types need the full schema but only the schema definition. This makes schema definition implementation easier by juts allowing users to manually implement `PartialSchema` type for their type if needed. Still as usual the implementation can be automatically derived with `ToSchema` derive trait. Fixes #500 Fixes #801
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like the parameter to
request_body
is dumbly translated to a string. This means, if you write a non-existant type there, it will happily accept that.We should emit even just a basic
use
that ensures the type exists.The text was updated successfully, but these errors were encountered: