Skip to content

Commit

Permalink
CTOOLS-373: Debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Storey-Finbourne committed Oct 1, 2024
1 parent 01f91c3 commit a51369d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generate/templates/api_test.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,14 @@ class {{#operations}}Test{{classname}}(unittest.IsolatedAsyncioTestCase):
{{^isPrimitiveType}}
{{#content}}
spec_filepath = os.environ['OPENAPI_SPEC_PATH']
print('spec_filepath', spec_filepath)
with open(spec_filepath) as file:
openapiSpecJson = file.read()

method = "{{httpMethod}}".replace("Http", "").lower()
jsonContent = json.loads(openapiSpecJson)
jsonContent = jsonContent["paths"]["{{path}}"][method]["requestBody"]["content"]["application/json"]
print('jsonContent: ',jsonContent)
{{paramName}}: {{{dataType}}} = None
# {{complexType}}
if "example" in jsonContent:
Expand Down

0 comments on commit a51369d

Please sign in to comment.