Skip to content

Commit

Permalink
fix: remove name field from parameter shape (from 2.0.0-rc2 version) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu authored Feb 18, 2022
1 parent 7e56f16 commit 687fb1e
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 9 deletions.
6 changes: 6 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ function from__2_0_0_rc1__to__2_0_0_rc2(asyncapi2rc1, options) { // NOSONAR
});
}

if (result.components && result.components.parameters) {
_.each(result.components.parameters, (parameter) => {
if (parameter.name) delete parameter.name;
});
}

if (!options.id) delete result.id;
return result;
}
Expand Down
1 change: 0 additions & 1 deletion test/input/2.0.0-rc2/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down
1 change: 0 additions & 1 deletion test/input/2.0.0/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down
1 change: 0 additions & 1 deletion test/input/2.1.0/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down
1 change: 0 additions & 1 deletion test/input/2.2.0/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down
1 change: 0 additions & 1 deletion test/output/2.0.0-rc2/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down
1 change: 0 additions & 1 deletion test/output/2.0.0/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down
1 change: 0 additions & 1 deletion test/output/2.1.0/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down
1 change: 0 additions & 1 deletion test/output/2.2.0/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down
1 change: 0 additions & 1 deletion test/output/2.3.0/streetlights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ components:
description: Provide your API key as the user and leave the password empty.
parameters:
streetlightId:
name: streetlightId
description: The ID of the streetlight.
schema:
type: string
Expand Down

0 comments on commit 687fb1e

Please sign in to comment.