-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make referenced schemas required (#1018)
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
- Loading branch information
Showing
16 changed files
with
290 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.