mirror of
https://github.com/Sea-Haven-Industries/afterhours-shift-manager.git
synced 2026-10-07 06:59:00 +00:00
Promote operation-4xx-response and the 2xx-or-3xx success rule to error. Drop unused 400s on health and CORS OPTIONS. Health documents 403 like the portal. CORS stays in Flask and is not part of the employee contract. Co-authored-by: Adam Moussa <amoussa1229@users.noreply.github.com>
32 lines
816 B
YAML
32 lines
816 B
YAML
# Same Redocly recommended ruleset as internal-portal (DEV-223 / DEV-289).
|
|
# Recommended operation-2xx-response does not count 302. Login-style redirects
|
|
# succeed with 302, so that rule is replaced by operation-2xx-or-3xx-response
|
|
# at error. operation-4xx-response is promoted to error so missing 4xx fails CI.
|
|
extends:
|
|
- recommended
|
|
|
|
rules:
|
|
operation-2xx-response: off
|
|
operation-4xx-response: error
|
|
rule/operation-2xx-or-3xx-response:
|
|
subject:
|
|
type: Responses
|
|
message: Operation must define a 2XX or 3XX response.
|
|
severity: error
|
|
assertions:
|
|
requireAny:
|
|
- "200"
|
|
- "201"
|
|
- "202"
|
|
- "204"
|
|
- "301"
|
|
- "302"
|
|
- "303"
|
|
- "307"
|
|
- "308"
|
|
- "2XX"
|
|
- "3XX"
|
|
|
|
apis:
|
|
afterhours@v1:
|
|
root: openapi.yaml
|