forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parameter uniqueness for form- and body-params (OpenAPITools#7577)
If a form-parameter had the same name as another (header-, query-, path-, or cookie-)parameter, a conflict could be caused (for example in the typescript generator). This fix executes the same uniqueness- check and renaming for form- and body-parameters as it is done for all other parameters. @see issue OpenAPITools#7575 Co-authored-by: Alexander Rashed <[email protected]>
- Loading branch information
1 parent
aca6927
commit 54d6257
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
50 changes: 50 additions & 0 deletions
50
modules/openapi-generator/src/test/resources/3_0/form-duplicated-parameter.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: FormData Test Api Documentation | ||
description: Minimal OpenAPI spec file to showcase duplicated params for formData. | ||
version: 0.0.1 | ||
servers: | ||
- url: /backend/rest | ||
tags: | ||
- name: form-param-poc | ||
description: File storage resource for Fiscalization France standard | ||
paths: | ||
'/form-param-poc/{id}': | ||
put: | ||
tags: | ||
- form-param-poc | ||
summary: fullUpdate | ||
operationId: form-param-poc_update | ||
parameters: | ||
- name: id | ||
in: path | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
requestBody: | ||
content: | ||
multipart/form-data: | ||
schema: | ||
$ref: '#/components/schemas/FormParameters' | ||
responses: | ||
'200': | ||
description: OK. | ||
security: | ||
- oAuthConfig: [] | ||
components: | ||
schemas: | ||
FormParameters: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
readOnly: true | ||
securitySchemes: | ||
oAuthConfig: | ||
type: oauth2 | ||
flows: | ||
implicit: | ||
authorizationUrl: ../backend/login/openid | ||
scopes: {} |