diff --git a/coreapi/document.py b/coreapi/document.py index c6c9ceb..a0d28f9 100644 --- a/coreapi/document.py +++ b/coreapi/document.py @@ -46,8 +46,8 @@ def _key_sorting(item): # NOTE: 'type', 'description' and 'example' are now deprecated, # in favor of 'schema'. -Field = namedtuple('Field', ['name', 'required', 'location', 'schema', 'description', 'type', 'example']) -Field.__new__.__defaults__ = (False, '', None, None, None, None) +Field = namedtuple('Field', ['name', 'required', 'location', 'schema', 'method', 'description', 'type', 'example']) +Field.__new__.__defaults__ = (False, '', None, ('GET',), None, None, None) # The Core API primitives: @@ -215,7 +215,7 @@ def __init__(self, url=None, action=None, encoding=None, transform=None, title=N self._title = '' if (title is None) else title self._description = '' if (description is None) else description self._fields = () if (fields is None) else tuple([ - item if isinstance(item, Field) else Field(item, required=False, location='') + item if isinstance(item, Field) else Field(item, required=False, location='', method='') for item in fields ]) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy