-
Notifications
You must be signed in to change notification settings - Fork 78
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
billing/pdf: add content type header #697
base: main
Are you sure you want to change the base?
Conversation
The response for `/v2/customers/my/invoices/{uuid}/pdf` contains a `content-type` header in the response, so we should include that in the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -12,7 +14,7 @@ headers: | |||
$ref: '../../../shared/headers.yml#/ratelimit-reset' | |||
|
|||
content: | |||
application/pdf: | |||
application/pdf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this is how the content type was determined but, you're right, the content-type isn't added to the rendered docs without it being set in the headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The response will be a PDF file. | ||
|
||
headers: | ||
content-type: | ||
$ref: '../../../shared/headers.yml#/content-type' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this ref defines the content-type as application/json
https://github.com/digitalocean/openapi/blob/main/specification/shared/headers.yml#L51
You might need to add a new schema for pdf content type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya... It's the "example." It's really just documenting that the header is returned, not what it's content type is. Looks like we have the same problem with the content-disposition header example as well. It uses csv
The response for
/v2/customers/my/invoices/{uuid}/pdf
contains acontent-type
header in the response, so we should include that in the spec.