Skip to content
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

Path parameters don't preserve description #94

Open
fmigneault opened this issue Aug 16, 2018 · 0 comments
Open

Path parameters don't preserve description #94

fmigneault opened this issue Aug 16, 2018 · 0 comments

Comments

@fmigneault
Copy link

When using definition of an endpoint like so:

class MyValue(MappingSchema):
    value_id = SchemaNode(String(), description='My precious value')

Corresponding to following service and method:

myvalue_service = Service(name='myvalue', path='/values/{value_id}')

@myvalue_service.get(schema=MyValue())
def get_my_value(request):
    value_key = request.matchdict.get('value_id')
    return value_dict[value_key]

The parameters section of the returned swagger json for GET /values/{value_id} doesn't preserve the description ('My precious value') for value_id. The parameter is listed, but just doesn't have its description (maybe also example? not tested).

Other descriptions for querystring and body elements are properly preserved using the same description input, but not for path elements.

fmigneault added a commit to fmigneault/cornice.ext.swagger that referenced this issue Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants