question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document: content-types for supported formats

See original GitHub issue

We’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 be application/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:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
alesjcommented, Sep 2, 2019

application/x-protobuf

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found