apispec
apispec copied to clipboard
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
In Marshmallow, you can order the fields by using `class Meta: ordered = True`, like: ``` class FooSchema(Schema): b = fields.Int() a = fields.int() class Meta: ordered = True for...
distutils.version.LooseVersion has been deprecated, instead use packaging.version.Version
Add a layer above `field2property`to allow for more customization of the result. Generalizes the `multiple`mechanism to deal with not only `List`. There might be room for factorization with attribute functions...
I've been trying to document webargs's `DelimitedList` (child class of `List`) and I'm stuck because I'd need to override hardcoded stuff. ```py def field2parameter(self, field, name, default_in): location = field.metadata.get("location",...
I have a file with 5 methods, each method have their own docstring, but there is too much duplication in the docstring, the parameters are almost the same for those...
When generating a schema for a single data class referencing same nested type in multiple fields each field get a separate schema. Even though it is the same type. Though,...
Perhaps this is too obvious for most, but I struggled a bit figuring out how to use the result of my apispec to actually serve a Swagger UI from my...
Hi, so I have a schema which uses a custom field. Currently you expect that we do the following: ``` ma = MarshmallowPlugin() @ma.map_to_openapi_type(fields.Dict) class Custom(field.Field): pass ``` However, it's...
It looks like the version classes used in `apispec.utils` were deprecated with setuptools since 59.5.: https://github.com/pypa/setuptools/commit/1701579e0827317d8888c2254a17b5786b6b5246 from source change: https://github.com/pypa/distutils/pull/75 ``` .tox/py37/lib/python3.7/site-packages/apispec/__init__.py:3: in from .core import APISpec .tox/py37/lib/python3.7/site-packages/apispec/core.py:13: in from...
If we e.g. have a marshmallow Schema like this: ```py from marshmallow_sqlalchemy import fields, SQLAlchemyAutoSchema class FooSchema(SQLAlchemyAutoSchema): parent = fields.Nested("BarSchema", only=("id", "name")) ``` and call `spec.components.schema('Foo', schema=FooSchema)`, then “BarSchema” gets...