Skip to content

Commit

Permalink
Fix OpenAPI issue from pagination
Browse files Browse the repository at this point in the history
https://pulp.plan.io/issues/8037
closes #8037

(cherry picked from commit a2dbb16)
  • Loading branch information
fao89 committed Jan 15, 2021
1 parent dab9f31 commit c49ef8c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGES/8037.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed v3 schema pagination to match OpenAPI standard
42 changes: 24 additions & 18 deletions pulp_ansible/app/galaxy/v3/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,33 @@ def get_paginated_response_schema(self, schema):
"type": "object",
"properties": {
"meta": {
"count": {
"type": "integer",
"example": 123,
"type": "object",
"properties": {
"count": {
"type": "integer",
"example": 123,
},
},
},
"links": {
"first": {
"type": "string",
"nullable": True,
},
"previous": {
"type": "string",
"nullable": True,
},
"next": {
"type": "string",
"nullable": True,
},
"last": {
"type": "string",
"nullable": True,
"type": "object",
"properties": {
"first": {
"type": "string",
"nullable": True,
},
"previous": {
"type": "string",
"nullable": True,
},
"next": {
"type": "string",
"nullable": True,
},
"last": {
"type": "string",
"nullable": True,
},
},
},
"data": schema,
Expand Down

0 comments on commit c49ef8c

Please sign in to comment.