-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
feat: pass examples given in the FieldDefinition
to the OpenAPIMediaType
#3222
base: v3.0
Are you sure you want to change the base?
Commits on Apr 7, 2024
-
feat: Support
schema_extra
inParameter
andBody
(litestar-org#……3204) * feat: Support `schema_extra` in `Parameter` and `Body` (litestar-org#3022) This adds sort of a backdoor for modifying the generated OpenAPI spec. The value is given as `dict[str, Any]` where the key must match with the keyword parameter name in `Schema`. The values are used to override items in the generated `Schema` object, so they must be in correct types (ie. not in dictionary/json format). The values are added at main level, without recursive merging (because we're adjusting `Schema` object and not a dictionary). Recursive merge would be much more work. Chose not to implement the same for `ResponseSpec` because response models are generated as schema components, while `ResponseSpec` can be locally different. Handling the logic of creating new components when `schema_extra` is passed in `ResponseSpec` would be extra effort, and isn't probably as important as being able to adjust the inbound parameters, which are actually validated (and for which the documentation is even more important, than for the response). * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> --------- Co-authored-by: Jacob Coffee <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f39864e - Browse repository at this point
Copy the full SHA f39864eView commit details -
feat: Added precedence of CLI parameters over envs (litestar-org#3190)
* feat: Added precedence of CLI parameters over envs * Update docs/usage/cli.rst Co-authored-by: Peter Schutt <[email protected]> * Remove redundant LitestarEnv fields and fix tests * Update docs/usage/cli.rst * Update litestar/cli/commands/core.py * Update docs/usage/cli.rst * Update docs/usage/cli.rst * Update litestar/cli/commands/core.py --------- Co-authored-by: kedod <kedod> Co-authored-by: Peter Schutt <[email protected]> Co-authored-by: Jacob Coffee <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 085c88a - Browse repository at this point
Copy the full SHA 085c88aView commit details -
fix: pass examples given in the FieldDefinition to the OpenAPIMediaTy…
…pe, within request_body.py (cherry picked from commit 821d3bc)
Configuration menu - View commit details
-
Copy full SHA for 4544ed7 - Browse repository at this point
Copy the full SHA 4544ed7View commit details -
fix: move imports into type-checking block
(cherry picked from commit 2835122)
Configuration menu - View commit details
-
Copy full SHA for eb95a86 - Browse repository at this point
Copy the full SHA eb95a86View commit details -
(cherry picked from commit 0eded49)
Configuration menu - View commit details
-
Copy full SHA for 48a1556 - Browse repository at this point
Copy the full SHA 48a1556View commit details -
fix: add test and instance checking.
(cherry picked from commit e6a1bb7)
Configuration menu - View commit details
-
Copy full SHA for 1cba655 - Browse repository at this point
Copy the full SHA 1cba655View commit details -
fix: use
get_formatted_examples
to format examples.(cherry picked from commit 6336cbf)
Configuration menu - View commit details
-
Copy full SHA for 3426fe3 - Browse repository at this point
Copy the full SHA 3426fe3View commit details -
fix: pass examples given in the FieldDefinition to the OpenAPIMediaTy…
…pe, within request_body.py (cherry picked from commit 821d3bc)
Configuration menu - View commit details
-
Copy full SHA for d4e7401 - Browse repository at this point
Copy the full SHA d4e7401View commit details -
fix: use
get_formatted_examples
to format examples.(cherry picked from commit 1e75753)
Configuration menu - View commit details
-
Copy full SHA for 5288f5e - Browse repository at this point
Copy the full SHA 5288f5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 95b473c - Browse repository at this point
Copy the full SHA 95b473cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9882ea7 - Browse repository at this point
Copy the full SHA 9882ea7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac67c60 - Browse repository at this point
Copy the full SHA ac67c60View commit details -
feat: Added precedence of CLI parameters over envs (litestar-org#3190)
* feat: Added precedence of CLI parameters over envs * Update docs/usage/cli.rst Co-authored-by: Peter Schutt <[email protected]> * Remove redundant LitestarEnv fields and fix tests * Update docs/usage/cli.rst * Update litestar/cli/commands/core.py * Update docs/usage/cli.rst * Update docs/usage/cli.rst * Update litestar/cli/commands/core.py --------- Co-authored-by: kedod <kedod> Co-authored-by: Peter Schutt <[email protected]> Co-authored-by: Jacob Coffee <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3b5cbb8 - Browse repository at this point
Copy the full SHA 3b5cbb8View commit details -
fix: F811 Redefinition of unused `test_run_command_arguments_preceden…
…ce` from line 354
Configuration menu - View commit details
-
Copy full SHA for 1d54273 - Browse repository at this point
Copy the full SHA 1d54273View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8eddfaa - Browse repository at this point
Copy the full SHA 8eddfaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61388f1 - Browse repository at this point
Copy the full SHA 61388f1View commit details -
feat: Add LITESTAR_ prefix before WEB_CONCURRENCY env option (litesta…
…r-org#3227) * feat: Add LITESTAR_ prefix for web concurrency env option * Replace depacrated with versionchanged directive * Change wc option description * Remove depracation warning --------- Co-authored-by: kedod <kedod>
Configuration menu - View commit details
-
Copy full SHA for e166797 - Browse repository at this point
Copy the full SHA e166797View commit details -
feat: Support
schema_extra
inParameter
andBody
(litestar-org#……3204) * feat: Support `schema_extra` in `Parameter` and `Body` (litestar-org#3022) This adds sort of a backdoor for modifying the generated OpenAPI spec. The value is given as `dict[str, Any]` where the key must match with the keyword parameter name in `Schema`. The values are used to override items in the generated `Schema` object, so they must be in correct types (ie. not in dictionary/json format). The values are added at main level, without recursive merging (because we're adjusting `Schema` object and not a dictionary). Recursive merge would be much more work. Chose not to implement the same for `ResponseSpec` because response models are generated as schema components, while `ResponseSpec` can be locally different. Handling the logic of creating new components when `schema_extra` is passed in `ResponseSpec` would be extra effort, and isn't probably as important as being able to adjust the inbound parameters, which are actually validated (and for which the documentation is even more important, than for the response). * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> --------- Co-authored-by: Jacob Coffee <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1c41cd1 - Browse repository at this point
Copy the full SHA 1c41cd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for cceefda - Browse repository at this point
Copy the full SHA cceefdaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b8ac98 - Browse repository at this point
Copy the full SHA 8b8ac98View commit details -
fix: add test and instance checking.
(cherry picked from commit e6a1bb7)
Configuration menu - View commit details
-
Copy full SHA for 1204e80 - Browse repository at this point
Copy the full SHA 1204e80View commit details -
feat: Support
schema_extra
inParameter
andBody
(litestar-org#……3204) * feat: Support `schema_extra` in `Parameter` and `Body` (litestar-org#3022) This adds sort of a backdoor for modifying the generated OpenAPI spec. The value is given as `dict[str, Any]` where the key must match with the keyword parameter name in `Schema`. The values are used to override items in the generated `Schema` object, so they must be in correct types (ie. not in dictionary/json format). The values are added at main level, without recursive merging (because we're adjusting `Schema` object and not a dictionary). Recursive merge would be much more work. Chose not to implement the same for `ResponseSpec` because response models are generated as schema components, while `ResponseSpec` can be locally different. Handling the logic of creating new components when `schema_extra` is passed in `ResponseSpec` would be extra effort, and isn't probably as important as being able to adjust the inbound parameters, which are actually validated (and for which the documentation is even more important, than for the response). * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> --------- Co-authored-by: Jacob Coffee <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e3daa83 - Browse repository at this point
Copy the full SHA e3daa83View commit details -
Configuration menu - View commit details
-
Copy full SHA for c01f993 - Browse repository at this point
Copy the full SHA c01f993View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8e9977 - Browse repository at this point
Copy the full SHA a8e9977View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58108c0 - Browse repository at this point
Copy the full SHA 58108c0View commit details