Open sabbyanandan opened 10 months ago
Here's an example from the tests:
const response3 = await fastify.inject({ method: 'GET',
url: '/ordinals/v1/inscriptions?mime_type=image/png&mime_type=text/plain',
});
Note the repeated mime_type
-- I don't think the request is failing due to an encoding issue, it seems like it's failing because the 2nd mime type is provided without the mime_type
argument.
@diwakergupta: Oh! Thanks for catching that. I blindly copied the URL from the dev console (through Ordinals Explorer) and included that in the example I listed in the description. I didn't pay close attention to the multiple mime_type
pairs.
Here's an example from the tests:
const response3 = await fastify.inject({ method: 'GET', url: '/ordinals/v1/inscriptions?mime_type=image/png&mime_type=text/plain', });
Note the repeated
mime_type
-- I don't think the request is failing due to an encoding issue, it seems like it's failing because the 2nd mime type is provided without themime_type
argument.
Correct, current API documentation states to use a comma to separate the values and the API tester implements this non functioning format.
See the line "Example: image/png,image/jpeg" at https://docs.hiro.so/ordinals/list-of-inscriptions
Aside from the OpenAPI spec and the related documentation issue, @nima1981 wonders (as a new feature request) whether the Ordinals API can support either of the following formats:
a: "comma separated" values b: a regex
From Nima:
An example of a correctly encoded URL would be:
The API demo panel in the Docs is not correctly encoding the special chars in the query param. But it could also be due to how the OpenAPI spec is designed. Therefore, I am opening the issue in the Ordinals API so we can verify it here first.