Skip to content

Commit

Permalink
fix: docs rest model (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbestipa authored Sep 26, 2023
1 parent 7501519 commit 3869736
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion quetz/rest_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class ChannelMetadata(BaseModel):

class Channel(ChannelBase):
metadata: ChannelMetadata = Field(
default_factory=ChannelMetadata, title="channel metadata", examples={}
default_factory=ChannelMetadata, title="channel metadata", examples=[]
)

actions: Optional[List[ChannelActionEnum]] = Field(
Expand Down
16 changes: 16 additions & 0 deletions quetz/tests/test_docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def test_docs_endpoint(client):
response = client.get("/docs")
assert response.status_code == 200
assert "text/html" in response.headers['Content-Type']


def test_openapi_endpoint(client):
response = client.get("/openapi.json")
assert response.status_code == 200
assert "application/json" in response.headers['Content-Type']


def test_redoc_endpoint(client):
response = client.get("/redoc")
assert response.status_code == 200
assert "text/html" in response.headers['Content-Type']

0 comments on commit 3869736

Please sign in to comment.