We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Calling an endpoint and not specifying the value for an array query parameter results in handler receiving ['']
For example , when requesting curl -i -X GET "http://127.0.0.1:8080/test?ids=" in the handler, instead of [] I get ["]
curl -i -X GET "http://127.0.0.1:8080/test?ids="
Steps to reproduce swagger.yaml
openapi: 2.0.0 info: version: 1.0 paths: /test: get: operationId: test_handler parameters: - name: ids required: false in: query type: array collectionFormat: csv items: type: string format: uuid responses: "200"
main.py
from typing import List from aiohttp.web import Application, run_app from aiohttp.web import Request, Response from aiohttp_apiset import SwaggerRouter from aiohttp_apiset.middlewares import jsonify from aiohttp_apiset.swagger.operations import OperationIdMapping async def test_handler(request: Request, ids: List[str]) -> Response: print(f"Received list: {ids}") return Response() def main(): router = SwaggerRouter( swagger_ui='/swagger/', search_dirs=['./'], ) app = Application(router=router, middlewares=[jsonify]) opmap = OperationIdMapping(test_handler=test_handler) router.include(spec='swagger.yaml', operationId_mapping=opmap) run_app(app) if __name__ == "__main__": main()
Python version: 3.10.2 aiohttp_apiset vesion: 0.9.15
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Calling an endpoint and not specifying the value for an array query parameter results in handler receiving ['']
For example , when requesting
curl -i -X GET "http://127.0.0.1:8080/test?ids="
in the handler, instead of [] I get ["]Steps to reproduce
swagger.yaml
main.py
Python version: 3.10.2
aiohttp_apiset vesion: 0.9.15
The text was updated successfully, but these errors were encountered: