-
Notifications
You must be signed in to change notification settings - Fork 4
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
String parameter format #4
Comments
If you pass an object that's a Dataclass or contains a Marshmallow Schema in attribute from dataclasses import dataclass
from openapi_specgen import OpenApiParam
@dataclass
class Foo():
bar: str
param = OpenApiParam('test_param', 'query', Foo)
param.as_dict()
# Generated output for this OpenApiParam
#{'required': True, 'name': 'test_param', 'in': 'query', 'schema': {'$ref': '#/components/schemas/Foo', 'title': 'Test_Param'}} |
I do understand that this is how you generate schema for various objects, however this is not the case i was talking about. A string parameter with a format of uuid An integer parameter whose value is an enum: An integer parameter with minimum value: |
Oh, sorry, I misunderstood. Currently format is supported only by type. Meaning specific types have specific formats (date and datetime). We can add a optional parameter Does that work for you ? |
Expected way to do this in 1.0.0 is using a custom type and a custom resolver. |
Did i miss a way to create an OpenApiParam and describing its format (or any other schema property)?
The text was updated successfully, but these errors were encountered: