-
Notifications
You must be signed in to change notification settings - Fork 82
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
description: >- | ||
description: >- | ||
The response will be a PDF file. | ||
|
||
headers: | ||
content-type: | ||
$ref: '../../../shared/headers.yml#/content-type' | ||
content-disposition: | ||
$ref: '../../../shared/headers.yml#/content-disposition' | ||
ratelimit-limit: | ||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. |
||
schema: | ||
type: string | ||
format: binary | ||
format: binary |
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