Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
66 stars 23 forks source link

Base route of the API returns a "not found message" #98

Closed demeringo closed 2 years ago

demeringo commented 2 years ago

Problem

When querying the base route of the api (e.g. https://api.boavizta.org/) the API returns an error message that is not very user friendly for people discoverring the API.

// 20220609120708
// https://api.boavizta.org/

{
  "detail": "Not Found"
}

Solution

Maybe we could improve this error message with some kind of welcome message, and a link to the OpenAPI or API documentation.

Alternatives

Additional context or elements

da-ekchajzer commented 2 years ago

I did this as a first approach. What do you think ?

Screenshot_20220616_175320

demeringo commented 2 years ago

@da-ekchajzer, yes I think it would be perfect 👍

Just a small typo on the last entry (the a before of Boavizta).

Thank you

demeringo commented 2 years ago

I just pushed the change on your orginal branch https://github.com/Boavizta/boaviztapi/tree/feat/issue/98

Maybe, I should also try to make the link to OAS spec relative (so that it works when deployed in serverless or other self hosted mode).

demeringo commented 2 years ago

I added the 2 small fixes to your PR https://github.com/Boavizta/boaviztapi/pull/100