Skip to content

Commit

Permalink
Fix incorrect placement of header=present in versions endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Jul 20, 2020
1 parent d8443d6 commit 660f5a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion openapi/index_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
"200": {
"description": "Successful Response",
"content": {
"text/csv": {
"text/csv; header=present": {
"schema": {
"type": "string"
}
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@
"200": {
"description": "Successful Response",
"content": {
"text/csv": {
"text/csv; header=present": {
"schema": {
"type": "string"
}
Expand Down
4 changes: 2 additions & 2 deletions optimade/server/routers/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class CsvResponse(Response):
media_type = "text/csv"
media_type = "text/csv; header=present"


@router.get(
Expand All @@ -17,4 +17,4 @@ def get_versions(request: Request):
"""Respond with the text/csv representation for the served versions."""
version = BASE_URL_PREFIXES["major"].replace("/v", "")
response = f"version\n{version}"
return CsvResponse(content=response, headers={"header": "present"})
return CsvResponse(content=response)

0 comments on commit 660f5a9

Please sign in to comment.