Skip to content

Feature request - replace errors with problems; reuse/extend problem schema more #4

Description

@DavidBiesack

This is a suggestion for a feature request.
The current schema defines an errors array using a secondary error-item.yaml schema.
I suggest two changes:

  1. rename errors to problems, since all errors are problems, but not all problems are errors. That is, this is application/problem+json not application/error+json
  2. instead of introducing another data models for the array items, just reuse (or extend) the existing schemas/problem-details.yaml schema.
    • replace code with type as in problem-details.yaml, for the same reason that type uses a URI and not just a string/code.
    • replace pointer and header and parameter with the instance property to be the uri-reference of the specific API request that has a problem. This can be a URN (a URN is one form of a URI); the prefix on the URN indicates what type of value the problem relates to, analogous to(but broader than) the in values for a parameter in OpenAPI. Values of in tell the recipient how to interpret or navigate the instance: URI. Values are body:, header:, path: and the remainder of the URN can be (in URN format) the values indicated for the existing pointer and header and parameter values in error-item.yaml.

If you like, I can draft a PR which more completely demonstrates this, with examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions