You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Galaxy_ng integration tests fail with invalid openapi format, I'm not really sure why it started showing now
=================================== 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'
Exception in thread "main" java.lang.RuntimeException: Could not process model 'Purge'.Please make sure that your schema is correct!
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:496)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:1005)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:431)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:61)
Caused by: java.lang.ClassCastException: java.time.OffsetDateTime cannot be cast to java.lang.String
at org.openapitools.codegen.languages.PythonClientCodegen.toExampleValueRecursive(PythonClientCodegen.java:724)
at org.openapitools.codegen.languages.PythonClientCodegen.toExampleValue(PythonClientCodegen.java:703)
at org.openapitools.codegen.DefaultCodegen.fromProperty(DefaultCodegen.java:2846)
at org.openapitools.codegen.DefaultCodegen.addVars(DefaultCodegen.java:4534)
at org.openapitools.codegen.DefaultCodegen.addVars(DefaultCodegen.java:4482)
at org.openapitools.codegen.DefaultCodegen.fromModel(DefaultCodegen.java:2[378](https://github.com/pulp/pulpcore/actions/runs/4224067517/jobs/7334573002#step:8:379))
at org.openapitools.codegen.DefaultGenerator.processModels(DefaultGenerator.java:1289)
at org.openapitools.codegen.DefaultGenerator.generateModels(DefaultGenerator.java:491)
... 4 more
Error: Process completed with exit code 1.
error java.time.OffsetDateTime cannot be cast to java.lang.String seems like bug in openapi-generator 4.3.1 and is fixed in version >=5.0.0 (OpenAPITools/openapi-generator#6694)
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes: #3585
Galaxy_ng integration tests fail with invalid openapi format, I'm not really sure why it started showing now