Closed StL-Jim closed 10 months ago
Thanks for reporting, @StL-Jim! I'll try to have a look at it in the next 10 days.
@StL-Jim I couldn't really reproduce the issue. Could you please try it on a different OS?
We simply write the contents to the file: https://github.com/Parquery/swagger-to/blob/d0427c9f56e0a30a04e0777eb874954c99f1c90a/swagger_to/bin/swagger_to_py_client.py#L50
I'm closing the issue due to inactivity.
Trying to generate a DefectDojo client using swagger_to_py_client.py and it's not writing to a file, it's only writing to the screen, not even to SDTOUT/STDERR.
python3.8 --version Python 3.8.5
Created virtual env: python3.8 -m venv venv3
Activate virtual env: source venv3/bin/activate
Install swagger_to with pip: bin/pip3.8 install swagger_to
bin/swagger_to_py_client.py --swagger_path ./dojo_swagger.yaml --outpath dojo_client.py
OUTPUT: ... ... 'only.'), ('pattern', '^[\w.@+-]+$'), ('maxLength', 150)])), ('first_name', RawDict([('type', 'string'), ('maxLength', 150)])), ('last_name', RawDict([('type', 'string'), ('maxLength', 150)]))])), ('required', ['username'])])), ('VulnerabilityId', RawDict([('type', 'object'), ('properties', RawDict([('vulnerability_id', RawDict([('type', 'string'), ('maxLength', 50)]))])), ('required', ['vulnerability_id'])])), ('VulnerabilityIdRequest', RawDict([('type', 'object'), ('properties', RawDict([('vulnerability_id', RawDict([('type', 'string'), ('minLength', 1), ('maxLength', 50)]))])), ('required', ['vulnerability_id'])])), ('VulnerabilityIdTemplate', RawDict([('type', 'object'), ('properties', RawDict([('vulnerability_id', RawDict([('type', 'string'), ('maxLength', 50)]))])), ('required', ['vulnerability_id'])])), ('VulnerabilityIdTemplateRequest', RawDict([('type', 'object'), ('properties', RawDict([('vulnerability_id', RawDict([('type', 'string'), ('minLength', 1), ('maxLength', 50)]))])), ('required', ['vulnerability_id'])]))])), ('securitySchemes', RawDict([('basicAuth', RawDict([('type', 'http'), ('scheme', 'basic')])), ('cookieAuth', RawDict([('type', 'apiKey'), ('in', 'cookie'), ('name', 'sessionid')])), ('tokenAuth', RawDict([('type', 'apiKey'), ('in', 'header'), ('name', 'Authorization'), ('description', 'Token-based authentication ' 'with required prefix ' '"Token"')]))]))]))])
We used the JSON schema of OpenAPI 2 from: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/88cd94419e117b154b67b834fa8e471bb98bd346/schemas/v2.0/schema.json