Skip to content

Conversation

sim13pods
Copy link

In the company we love to define our APIs errors according to the RFC9457 and then re-defined a reusable schema, starting from your initial version included in the README, which refers to the updated 2020-12 specification and that is used to:

  • be linked in OpenAPI documentations;
  • automatically generate Python models;
  • So we think it would be a good idea to contribute it back in order to alleviate the problems-registry users the task to write boilerplate code.

Having it in the repo as a proper file, rather than in the README, would also alleviate the task to users to import it in their projects , while it can be linked even from the GitHub RAW service, i.e. https://raw.githubusercontent.com/sim13pods/problems-registry/refs/heads/main/schema.yaml

We tested it already with

Any feedback about eventual follow-up, in order to match your requirements, will be very appreciated.

@sim13pods
Copy link
Author

Please have a look at the updated version of the OpenAPI definition, re-defined starting from https://app.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0

We found very useful defining types in order to generate Python's Pydantic v2 models then adopters just have to instantiate errors instances, without manually setting the URL type

@frankkilcommins
Copy link
Member

Thanks - I'll take a look next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants