aio-libs / aio-libs/aiohttp-apischema
Support non-json content types?
- Vorherrschende Sprache
- Python
- Sterne
- 12
- Forks
- 4
- Ø Merge
- 4 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
Hello and thanks for a great project!
I wondered whether there's any interest in support for non-json content types?
Two examples I have right now are that I'd like to annotate some existing methods to document:
- An API that returns no content. The only options I seem to have are `None` which comes back as `null` and an empty string, which comes back as `""`.
- A simple string value. I've refactored a method that used to be equivalent to `return web.Response('foo')` to be `return APIResponse('foo')` but over the wire, I'm changing the API behavior. It used to be returning `foo` but now it returns `"foo"`.
This assumption that all API respond in json requirement seems to be coming from [here](https://github.com/aio-libs/aiohttp-apischema/blob/master/aiohttp_apischema/response.py#L31-L37)?
Thank you!
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.