-
Notifications
You must be signed in to change notification settings - Fork 80
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
Support mapping types in OpenAPI schema #476
base: main
Are you sure you want to change the base?
Conversation
It is useful to return some grouped data ```python @DataClass class User: id: str name: str ``` Example for `Dict[str, list[User]]` ```json { "type": "object", "patternProperties": { "^[a-z0-9!\"#$%&'()*+,.\/:;<=>?@\[\] ^_`{|}~-]+$": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } }, "required": ["id", "name"] } } } } ```
I've pinned black to 23.12.1 because in the 24 release it wants to make a lot of changes. I guess it should be a separate patch. |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #476 +/- ##
==========================================
- Coverage 96.37% 96.35% -0.03%
==========================================
Files 69 69
Lines 6487 6506 +19
==========================================
+ Hits 6252 6269 +17
- Misses 235 237 +2 ☔ View full report in Codecov by Sentry. |
I don't understand what is the meaning of this fragment: description: Success response
content:
application/json:
schema:
type: object
properties:
^[a-z0-9!\"#$%&'()*+,.\/:;<=>?@\[\] ^_`{|}~-]+$:
type: object
properties:
^[0-9]+$:
$ref: '#/components/schemas/Cat'
nullable: false
nullable: false The documentation here for OpenAPI specification 3.0 describes structures that look much simpler than this one: |
@RobertoPrevato Oh, I forgot about I'll prepare changes with |
it requires Neoteroi/essentials-openapi#43 |
It is useful to return some grouped data
Example for
Dict[str, list[User]]