Skip to content
Discussion options

You must be logged in to vote

1. Best Practices for Extensions

  • Use extensions only when necessary (i.e., when the standard specification does not support your use case).
  • Keep them minimal and well-documented to avoid confusion for other developers.
  • Ensure your extensions do not conflict with existing OpenAPI keywords.

2. Custom Field Prefix

  • By convention, all custom fields must be prefixed with x-.
    • Example:
      paths:
        /users:
          get:
            x-rate-limit-category: premium
  • This ensures forward compatibility because OpenAPI tools ignore unknown x- fields gracefully.
  • Avoid using other prefixes unless you are building an internal tool with a controlled ecosystem.

3. Tooling Compatibility

  • Most tooling ignores x- ex…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@handrews
Comment options

@handrews
Comment options

@karenetheridge
Comment options

Answer selected by fatema432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants