Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openapi Purge schema has invalid date-time format #3585

Open
jerabekjiri opened this issue Feb 20, 2023 · 0 comments
Open

Openapi Purge schema has invalid date-time format #3585

jerabekjiri opened this issue Feb 20, 2023 · 0 comments
Labels

Comments

@jerabekjiri
Copy link
Contributor

Version
pulpcore: 3.23.0
galaxy_ng: 4.7.0

Describe the bug
default date-time format is invalid and generated openapi Purge schema fails on validate_spec

=================================== FAILURES ===================================
________________________ test_galaxy_openapi_validation ________________________
galaxy_ng/tests/integration/api/test_openapi.py:65: in test_galaxy_openapi_validation
    validate_spec(galaxy_spec)
/tmp/gng_testing/lib/python3.10/site-packages/openapi_spec_validator/shortcuts.py:17: in validate_spec
    return validator.validate(spec, spec_url=spec_url)
/tmp/gng_testing/lib/python3.10/site-packages/openapi_spec_validator/validation/proxies.py:28: in validate
    raise err
E   openapi_spec_validator.validation.exceptions.OpenAPIValidationError: '2023-01-14' is not a 'date-time'
E   
E   Failed validating 'format' in schema:
E       {'default': '2023-01-14',
E        'description': 'Purge tasks completed earlier than this timestamp. '
E                       "Format '%Y-%m-%d[T%H:%M:%S]'",
E        'format': 'date-time',
E        'type': 'string'}
E   
E   On instance:
E       '2023-01-14'
=========================== short test summary info ============================
FAILED galaxy_ng/tests/integration/api/test_openapi.py::test_galaxy_openapi_validation - openapi_spec_validator.validation.exceptions.OpenAPIValidationError: '2023-01-14' is not a 'date-time'

To Reproduce
Run the galaxy_ng integration test (https://github.com/ansible/galaxy_ng/blob/2553ee6c136db83c2afb306d2fbea6879cf9c870/galaxy_ng/tests/integration/api/test_openapi.py#L57) or run validate_spec on openapi.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants