You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apispec.exceptions.APISpecError: One or more HTTP methods are invalid: connect, update, websocket, move, copy, checkout, propfind, trace, lock, report, uncheckin, version-control, proppatch, mkcol, checkin, unlock
code
class HealthCheck:
def on_get(self, req, resp):
"""A cute furry animal endpoint.
---
description: Get a random pet
responses:
200:
description: A pet to be returned
schema: PetSchema
"""
resp.status = falcon.HTTP_200
resp.body = json.dumps({"status": resp.status, "message": "healthy"})
The text was updated successfully, but these errors were encountered:
Just had to got through it as a newbi.
When running the server with gunicorn and the default falcon example i run into this error as well.
Im on version 0.4.0 and getting this error.
Code:
`
import falcon
from apispec import APISpec
from falcon_apispec import FalconPlugin
import json
class ThingsResource(object):
def on_get(self, req, resp):
"""Handles GET requests
---
description: Prints cite from Kant
responses:
200:
description: Cite to be returned
"""
resp.status = falcon.HTTP_200 # This is the default status
resp.body = ('\nTwo things awe me most, the starry sky '
'above me and the moral law within me.\n'
'\n'
' ~ Immanuel Kant\n\n')
resp.content_type = falcon.MEDIA_TEXT
app = application = falcon.API()
things = ThingsResource()
app.add_route("/things", things)
code
The text was updated successfully, but these errors were encountered: