Skip to content

Commit

Permalink
Update docs: Remove calls to api.schema
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed May 24, 2019
1 parent e27b26f commit 7e09327
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
17 changes: 0 additions & 17 deletions docs/openapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,6 @@ Note that ``app.config`` overrides ``spec_kwargs``. The example above produces
flask parameter `APPLICATION_ROOT`. In OpenAPI v3, `basePath` is removed,
and the `servers` attribute can only be set by the user.

Register Schemas
----------------

When a schema is used multiple times throughout the spec, it is better to
add it to the spec's schema components so as to reference it rather than
duplicate its content.

To register a schema, use the :meth:`Api.schema` decorator:

.. code-block:: python
api = Api()
@api.schema('Pet')
class Pet(Schema):
...
Register Custom Fields
----------------------

Expand Down
1 change: 0 additions & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Define a marshmallow :class:`Schema <marshmallow.Schema>` to expose the model.

.. code-block:: python
@api.schema('Pet')
class PetSchema(ma.Schema):
class Meta:
Expand Down

0 comments on commit 7e09327

Please sign in to comment.