alysivji / alysivji/falcon-apispec

Does this work with falcon 3.0.0?

Ouverte
#31 3 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
47
Forks
31
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I recently upgraded from falcon 2.0.0 to 3.0.0 and started getting a bunch of errors thrown from the apispec library.

For comparison, without touching my code, this environment works without issue:
```
falcon 2.0.0
falcon-apispec 0.4.0
apispec 4.4.0
```
...and this environment produces the errors shown below:
```
falcon 3.0.0
falcon-apispec 0.4.0
apispec 4.4.0
```

```
src/my_service/app.py:246: in create_app
spec.path(resource=falcon_resource)
.tox/py38/lib/python3.8/site-packages/apispec/core.py:304: in path
self.clean_operations(operations)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
operations = OrderedDict([('get', {'summary': 'Get whether the service is alive or not.', 'parameters': [], 'responses': {200: {}}}...', {}), ('report', {}), ('uncheckin', {}), ('unlock', {}), ('update', {}), ('version-control', {}), ('websocket', {})])

def clean_operations(self, operations):
"""Ensure that all parameters with "in" equal to "path" are also required
as required by the OpenAPI specification, as well as normalizing any
references to global parameters. Also checks for invalid HTTP methods.

See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject.

:param dict operations: Dict mapping status codes to operations
"""
operation_names = set(operations)
valid_methods = set(VALID_METHODS[self.openapi_version.major])
invalid = {
key for key in operation_names - valid_methods if not key.startswith("x-")
}
if invalid:
> raise APISpecError(
"One or more HTTP methods are invalid: {}".format(", ".join(invalid))
)
E apispec.exceptions.APISpecError: One or more HTTP methods are invalid: lock, websocket, mkcol, proppatch, move, uncheckin, unlock, checkin, propfind, version-control, checkout, connect, copy, report, update
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.