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
From other extensions, I am used to renaming variables via the Rename Symbol context action (F2). This way, I can rename the declaration and all of it's usages without having to rely on search and replace.
Currently this is not supported by this extension (as far as I am aware of), but it would improve the user experience.
Example:
openapi: '3.0.2'info:
title: API Titleversion: '1.0'servers:
- url: https://api.server.test/v1paths:
/pets:
get:
description: Returns all pets from the system that the user has access toresponses:
'200':
description: A list of pets.content:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/Pet'/pets/{id}:
get:
description: Returns the pet with the given idparameters:
- name: idin: pathdescription: ID of pet to userequired: trueschema:
type: stringresponses:
'200':
description: A single petcontent:
application/json:
schema:
$ref: '#/components/schemas/Pet'components:
schemas:
Pet:
type: objectproperties:
id:
type: stringname:
type: string
As a user I could
put the mouse cursor on the pet definition in schemas and rename it and all it's references to i.e MyPet
put the mouse cursor on the $ref: '#/components/schemas/Pet' reference and rename all references and the referenced object to #/components/schemas/MyPet
such that the result would be:
openapi: '3.0.2'info:
title: API Titleversion: '1.0'servers:
- url: https://api.server.test/v1paths:
/pets:
get:
description: Returns all pets from the system that the user has access toresponses:
'200':
description: A list of pets.content:
application/json:
schema:
type: arrayitems:
$ref: '#/components/schemas/MyPet'/pets/{id}:
get:
description: Returns the pet with the given idparameters:
- name: idin: pathdescription: ID of pet to userequired: trueschema:
type: stringresponses:
'200':
description: A single petcontent:
application/json:
schema:
$ref: '#/components/schemas/MyPet'components:
schemas:
MyPet:
type: objectproperties:
id:
type: stringname:
type: string
The text was updated successfully, but these errors were encountered:
FieteO
changed the title
Support renaming objects via Rename Symbol context action (F2)
[feature request] Support renaming objects via Rename Symbol context action (F2)
Jan 10, 2023
FieteO
changed the title
[feature request] Support renaming objects via Rename Symbol context action (F2)
[feature request] Support renaming objects via the Rename Symbol context action (F2)
Jan 10, 2023
From other extensions, I am used to renaming variables via the Rename Symbol context action (F2). This way, I can rename the declaration and all of it's usages without having to rely on search and replace.
Currently this is not supported by this extension (as far as I am aware of), but it would improve the user experience.
Example:
As a user I could
pet
definition inschemas
and rename it and all it's references to i.eMyPet
$ref: '#/components/schemas/Pet'
reference and rename all references and the referenced object to#/components/schemas/MyPet
such that the result would be:
The text was updated successfully, but these errors were encountered: