Skip to content

Bugfix: Change 307 response description to fix OpenAPI error#11

Merged
JNKielmann merged 1 commit into
mainfrom
bugfix/openapi-307-error
Sep 20, 2021
Merged

Bugfix: Change 307 response description to fix OpenAPI error#11
JNKielmann merged 1 commit into
mainfrom
bugfix/openapi-307-error

Conversation

@JNKielmann
Copy link
Copy Markdown
Collaborator

During creation of the JavaScrpt client from the OpenAPI file an error
was thrown because the unsupported field "message" was set for the 307
response:

Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
 | Error count: 4, Warning count: 0
Errors:
	-attribute paths.'/projects/{project_id}/jobs/{job_id}/actions/{action_id}'(get).responses.307.message is unexpected
	-attribute paths.'/projects/{project_id}/jobs'(post).responses.307.message is unexpected
	-attribute paths.'/projects/{project_id}/services/{service_id}/actions/{action_id}'(get).responses.307.message is unexpected
	-attribute paths.'/projects/{project_id}/files/{file_key}/actions/{action_id}'(get).responses.307.message is unexpected

This is fixed by using the field "description" instead of "message"
which is part of the OpenAPI spec.

During creation of the java script client from the OpenAPI file an error
was thrown because the unsupported field "message" was set for the 307
response:
```
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
 | Error count: 4, Warning count: 0
Errors:
	-attribute paths.'/projects/{project_id}/jobs/{job_id}/actions/{action_id}'(get).responses.307.message is unexpected
	-attribute paths.'/projects/{project_id}/jobs'(post).responses.307.message is unexpected
	-attribute paths.'/projects/{project_id}/services/{service_id}/actions/{action_id}'(get).responses.307.message is unexpected
	-attribute paths.'/projects/{project_id}/files/{file_key}/actions/{action_id}'(get).responses.307.message is unexpected
```
This is fixed by using the field "description" instead of "message"
which is part of the OpenAPI spec.
@JNKielmann JNKielmann changed the title Change 307 response description to fix OpenAPI error Bugfix: Change 307 response description to fix OpenAPI error Sep 7, 2021
@lukasmasuch
Copy link
Copy Markdown
Contributor

LGTM. Thanks for the fix.

@JNKielmann JNKielmann merged commit 40fc460 into main Sep 20, 2021
@JNKielmann JNKielmann deleted the bugfix/openapi-307-error branch September 20, 2021 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants