Skip to content

Commit

Permalink
clean up unused headers after removing HEAD requests
Browse files Browse the repository at this point in the history
  • Loading branch information
caindy committed Mar 23, 2024
1 parent 582d088 commit 0b75ee9
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 62 deletions.
65 changes: 23 additions & 42 deletions docs/_data/openapi-split.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,71 +201,47 @@ components:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'200':
description: OK
'204':
description: Operation successful. No Content.
headers: &caching-headers
<<: *rate-limited-headers
ETag:
$ref: "#/components/headers/ETag"
'204':
description: Operation successful. No Content.
headers: *caching-headers

'400': &malformed
<<: *rate-limited
description: Malformed request
'401': &unauthorized
<<: *rate-limited
description: Unauthorized
'403': &forbidden
<<: *rate-limited
description: Access denied
'404': &not-found
<<: *rate-limited
description: Not Found
'406': &not-acceptable
<<: *rate-limited
description: Not Acceptable (Content negotiation failed)
'410': &gone
<<: *rate-limited
description: Gone
'429': &rate-limit-hit
description: Too many requests (rate limiting)
headers:
<<: *rate-limited-headers
Retry-After:
$ref: "#/components/headers/Retry-After"
'500': &unexpected-error
description: An unexpected error occurred
headers: *rate-limited-headers

# responses allowing content
'400-problem':
<<: *malformed
<<: *rate-limited
description: Malformed request
content: &problem
"application/problem+json":
schema:
$ref: '#/components/schemas/problem'
"application/json": # helpful errors when the request doesn't specify a TROLIE media type
# helpful errors when the request doesn't specify a TROLIE media type
"application/json":
schema:
$ref: '#/components/schemas/problem'
'401-empty':
<<: *unauthorized
<<: *rate-limited
description: Unauthorized
content: &empty
application/*:
schema:
$ref: "#/components/schemas/empty"
'403-empty':
<<: *forbidden
<<: *rate-limited
content: *empty
description: Access denied
'404-empty':
<<: *not-found
<<: *rate-limited
description: Not Found
content: *empty
'406-empty':
<<: *not-acceptable
<<: *rate-limited
description: Not Acceptable (Content negotiation failed)
content: *problem
'410-empty':
<<: *gone
<<: *rate-limited
description: Gone
content: *empty
'413-empty':
<<: *rate-limited
Expand Down Expand Up @@ -301,10 +277,15 @@ components:
description: Unprocessable content
content: *problem
'429-empty':
<<: *rate-limit-hit
description: Too many requests (rate limiting)
headers:
<<: *rate-limited-headers
Retry-After:
$ref: "#/components/headers/Retry-After"
content: *empty
'500-empty':
<<: *unexpected-error
description: An unexpected error occurred
headers: *rate-limited-headers
content: *empty

schemas:
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/paths/limits_forecast-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ get:
example:
$ref: "../../example-narratives/examples/forecast-limits-detailed.json"
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'
'304':
$ref: '../openapi-split.yaml#/components/responses/304'
'400':
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/paths/limits_realtime-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ get:
example:
$ref: '../../example-narratives/examples/realtime-limit-set-detailed.json'
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'
'304':
$ref: '../openapi-split.yaml#/components/responses/304'
'400':
Expand Down
4 changes: 2 additions & 2 deletions docs/_data/paths/rating-proposals_forecasts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ get: &get
example:
$ref: ../../example-narratives/examples/forecast-ratings-proposal-status.json
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down Expand Up @@ -91,7 +91,7 @@ patch:
content:
application/vnd.trolie.rating-forecast-proposal-status.v1+json: *status-response
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'400': *malformed
'401': *unauthorized-empty
Expand Down
4 changes: 2 additions & 2 deletions docs/_data/paths/rating-proposals_realtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ get:
application/json:
schema: *realtime-proposal
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down Expand Up @@ -71,7 +71,7 @@ patch:
application/json:
schema: *realtime-proposal
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'400': *malformed
'401': *unauthorized-empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ get:
application/json:
schema: *realtime-proposal
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'
'304':
$ref: '../openapi-split.yaml#/components/responses/304'
'400':
Expand Down
4 changes: 2 additions & 2 deletions docs/_data/paths/rating-proposals_seasonal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ get:
application/json:
schema: *seasonal-rating-proposal
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down Expand Up @@ -76,7 +76,7 @@ patch:
application/json:
schema: *seasonal-rating-proposal
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'400': *malformed
'401': *unauthorized-empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ get:
application/json:
schema: *seasonal-rating-proposal
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down Expand Up @@ -73,7 +73,7 @@ patch:
application/json:
schema: *seasonal-rating-proposal
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'400': *malformed
'401': *unauthorized-empty
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/paths/seasonal-ratings_season-instances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ get:
schema:
$ref: ../components/schemas/season-instance-set.yaml
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ get:
schema:
$ref: ../components/schemas/season-instance.yaml
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/paths/seasonal-ratings_snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ get:
application/json:
schema: *seasonal-rating-snapshot
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down
4 changes: 2 additions & 2 deletions docs/_data/paths/temporary-aar-exceptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ get:
schema:
$ref: ../components/schemas/temporary-rating-set.yaml
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down Expand Up @@ -130,7 +130,7 @@ post:
schema:
$ref: ../components/schemas/temporary-rating.yaml
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'
'400': *malformed
'401': *unauthorized-empty
'403': *forbidden-empty
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/paths/temporary-aar-exceptions_{id}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ get:
schema:
$ref: ../components/schemas/temporary-rating.yaml
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down
4 changes: 2 additions & 2 deletions docs/_data/paths/temporary-seasonal-ratings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ get:
schema:
$ref: ../components/schemas/temporary-rating-set.yaml
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down Expand Up @@ -124,7 +124,7 @@ post:
schema:
$ref: ../components/schemas/temporary-rating.yaml
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'400': *malformed
'401': *unauthorized-empty
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/paths/temporary-seasonal-ratings_{id}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ get:
schema:
$ref: ../components/schemas/temporary-rating.yaml
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'
$ref: '../openapi-split.yaml#/components/responses/204/headers'

'304':
$ref: '../openapi-split.yaml#/components/responses/304'
Expand Down

0 comments on commit 0b75ee9

Please sign in to comment.