Skip to content

Commit

Permalink
Missed some spots where path was still args
Browse files Browse the repository at this point in the history
  • Loading branch information
kreneskyp committed Feb 5, 2024
1 parent 8ef13ec commit 005119e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ix/utils/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def extract_nested_objects(schema, definitions, definition_name):
method_item = path_item.get(method.lower(), {})

path_properties, path_required = convert_to_json_schema(
method_item.get("parameters", []), "path", result["definitions"], "Args"
method_item.get("parameters", []), "path", result["definitions"], "Path"
)
query_properties, query_required = convert_to_json_schema(
method_item.get("parameters", []), "query", result["definitions"], "Query"
Expand All @@ -79,7 +79,7 @@ def extract_nested_objects(schema, definitions, definition_name):
"required": path_required,
},
result["definitions"],
"Args",
"Path",
)

if query_properties:
Expand Down
4 changes: 2 additions & 2 deletions ix/utils/tests/mock_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,15 @@

GET_DETAIL_SCHEMA = {
"definitions": {
"Args": {
"Path": {
"properties": {
"chain_id": {"format": "uuid", "title": "Chain Id", "type": "string"}
},
"required": ["chain_id"],
"type": "object",
}
},
"properties": {"args": {"$ref": "#/definitions/Args"}},
"properties": {"path": {"$ref": "#/definitions/Path"}},
"required": ["path"],
"type": "object",
}

0 comments on commit 005119e

Please sign in to comment.