Document: content-types for supported formats
See original GitHub issueWe’re going to be storing artifacts of the following formats in the registry:
- JSON Schema
- Avro
- Protobuff
- OpenAPI
- AsyncAPI
Most of these are in JSON format (or YAML which can easily be converted). But at least Protobuff is not. So there is an open question about how to handle the different content types when pushing content into the registry via the API and then returning it later.
The first step is to identify the actual content types for each format. And then additionally how to handle that in the API itself. In order to make it as simple as possible, we could try to figure out the type based on the following (in order):
- custom Request header e.g.
X-Registry-Type
- check the Request’s Content-Type for something that disambiguates the content. For example the request
Content-Type
might beapplication/json+openapi
- try to figure out the type from the content itself. This will work well for OpenAPI and AsyncAPI and probably Protobuff, but I’m not sure what else.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Common MIME types - HTTP - MDN Web Docs
Extension Kind of document MIME Type
.aac AAC audio audio/aac
.abw AbiWord document application/x‑abiword
.arc Archive document (multiple files embedded) application/x‑freearc
Read more >Introduction to content types and content type publishing
Learn how content types can help your business ensure consistent style across all the docuents, excel files, and other files that you create...
Read more >Document type vs File type vs Content type - SharePoint Maven
For example, Word, Excel, PowerPoint, PDF or JPG are all different file types. Essentially, I am talking about file extensions here: .doc, ...
Read more >What is a content type? - Ryte Wiki
MIME content types · Image/jpeg: JPEG image file · Image/tiff: TIFF image file · Text/plain: TXT file (Plain Text) · Video/mpeg: MP2, MPA,...
Read more >AWS S3 Content Types - IBM
dl, video/dl ; doc, application/msword ; dot, application/msword ; dp, application/commonground ; drw, application/drafting.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
application/x-protobuf
https://stackoverflow.com/questions/30505408/what-is-the-correct-protobuf-content-type