Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message: support doc_url, l10_key, debug_message, kv_map #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ components:
items: {}
result_info:
$ref: "#/components/schemas/result_info"
source:
type: object
properties:
pointer:
type: string
description: JSON Pointer [RFC6901] to the associated entity in the request document
parameter:
type: string
description: string indicating which URI query parameter, if any, caused the error
parameter_value_index:
type: integer
description: indicates position of parameter value, if any, which caused the error
messages:
type: array
items:
Expand All @@ -68,6 +80,23 @@ components:
minimum: 1000
message:
type: string
description: Error message rendered using accept-language header if provided and supported, otherwise rendered using origin server default locale
debug_message:
type: string
description: Error message rendered using origin server default locale if 'message' is not rendered using origin server default locale, omitted otherwise
l10n_key:
type: string
description: An optional key used to look up client-side locations from a map
doc_urls:
type: array
items:
type: string
description: Optional list of hyperlinks to documentation about the message
source:
$ref: "#/components/schemas/source"
meta:
type: object
description: A freeform key/value map. Origin servers will define structure for this field in their own OpenAPI specs.
uniqueItems: true
example: []

Expand Down Expand Up @@ -108,8 +137,17 @@ components:
- $ref: "#/components/schemas/messages"
minLength: 1
example:
- code: 7003
message: No route for the URI
- code: 1234
message: Il dominio 'www.example.com' è già in uso
debug_message: The domain 'www.example.com' is already in use
l10n_key: errors.domain_already_in_use
doc_urls:
- https://developers.cloudflare.com/api/operations/zones-post
- https://developers.cloudflare.com/api/
source:
pointer: "/domain/hostname"
meta:
hostname: www.example.com
messages:
allOf:
- $ref: "#/components/schemas/messages"
Expand Down