-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Labels
Description
Summary
The devproxy-errors.yaml example file wraps YAML anchors in a definitions property, borrowing a JSON Schema/OpenAPI convention that doesn't fit YAML idioms. YAML anchors are a native language feature and don't need a container.
Current behavior
Anchors are defined under a definitions: wrapper:
definitions:
client_error_body: &client_error_body
message: "Client Error"
server_error_body: &server_error_body
message: "Server Error"Proposed change
Move anchors to top-level keys, removing the unnecessary definitions nesting:
client_error_body: &client_error_body
message: "Client Error"
server_error_body: &server_error_body
message: "Server Error"
errors:
...This is more idiomatic YAML while still keeping the anchors in a dedicated, visible location (not inlined on the first usage, which would be fragile). The schema already allows arbitrary top-level keys to support plugin config sections, so no schema changes are needed.
Reactions are currently unavailable