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
When using class-based endpoints, if no methods are explicitly passed to add_route, this will raise an error when generating the schema. (using starlette==0.11.4, starlette-api==0.6.2)
INFO: ('127.0.0.1', 53618) - "GET /schema/ HTTP/1.1" 500
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 372, in run_asgi
result = await asgi(self.receive, self.send)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/uvicorn/middleware/debug.py", line 83, in __call__
raise exc from None
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/uvicorn/middleware/debug.py", line 80, in __call__
await asgi(receive, self.send)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette/middleware/errors.py", line 125, in asgi
raise exc from None
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette/middleware/errors.py", line 103, in asgi
await asgi(receive, _send)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette/exceptions.py", line 74, in app
raise exc from None
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette/exceptions.py", line 63, in app
await instance(receive, sender)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette_api/routing.py", line 174, in awaitable
response = await run_in_threadpool(injected_func)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette/concurrency.py", line 24, in run_in_threadpool
return await loop.run_in_executor(None, func, *args)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette_api/schemas.py", line 223, in schema
return OpenAPIResponse(self.schema)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette_api/schemas.py", line 219, in schema
return self.schema_generator.get_schema(self.routes)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette_api/schemas.py", line 175, in get_schema
self.spec.add_path(path=path, operations={e.method: self.get_endpoint_schema(e) for e in endpoints})
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette_api/schemas.py", line 175, in <dictcomp>
self.spec.add_path(path=path, operations={e.method: self.get_endpoint_schema(e) for e in endpoints})
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette_api/schemas.py", line 156, in get_endpoint_schema
self.get_endpoint_parameters_schema(endpoint, schema)
File "/Users/test/.virtualenvs/play/lib/python3.7/site-packages/starlette_api/schemas.py", line 114, in get_endpoint_parameters_schema
for field in itertools.chain(endpoint.query_fields.values(), endpoint.path_fields.values())
AttributeError: 'NoneType' object has no attribute 'values'
The text was updated successfully, but these errors were encountered:
When using class-based endpoints, if no methods are explicitly passed to
add_route
, this will raise an error when generating the schema. (usingstarlette==0.11.4
,starlette-api==0.6.2
)Traceback:
The text was updated successfully, but these errors were encountered: