-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
9.4.0, 9.6.0
-
Severity 3 - Minor
-
Issue Summary
Generating code from the OpenAPI spec fails due to errors on the file.
Steps to Reproduce
- Download the spec or use its URL directly, depending on the tool
- Attempt to generate server side code from the spec in any language, as in the example below:
Expected Results
The code is generated successfully.
Actual Results
The code cannot be generated. If using Postman, it returns the message:
Add a valid definition to generate code from it.
If using openapi-generator-cli, it returns the following message, indicating issues with the spec file:
Errors: -paths.'/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt'. Declared path parameter projectKey needs to be defined as a path parameter in path or operation level -attribute paths.'/mirroring/latest/authenticate'(post).operationId is repeated -attribute paths.'/sync/latest/projects/{projectKey}/repos/{repositorySlug}'(get).operationId is repeated -paths.'/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt'. Declared path parameter repositorySlug needs to be defined as a path parameter in path or operation level -attribute paths.'/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/builds'(get).operationId is repeated -paths.'/api/latest/projects/{projectKey}/secret-scanning/exempt'. Declared path parameter projectKey needs to be defined as a path parameter in path or operation level Warnings: -paths.'/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt'. Declared path parameter projectKey needs to be defined as a path parameter in path or operation level -attribute paths.'/mirroring/latest/authenticate'(post).operationId is repeated -attribute paths.'/sync/latest/projects/{projectKey}/repos/{repositorySlug}'(get).operationId is repeated -paths.'/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt'. Declared path parameter repositorySlug needs to be defined as a path parameter in path or operation level -attribute paths.'/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/builds'(get).operationId is repeated -paths.'/api/latest/projects/{projectKey}/secret-scanning/exempt'. Declared path parameter projectKey needs to be defined as a path parameter in path or operation level
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available