Open kavishdahekar-sap opened 3 months ago
Hi @kavishdahekar-sap This is sounds like an interesting feature to have! It would be pretty challenging to try to locate matching code, given that implementation could be in any language and framework? How do you plan to tackle this problem?
I was actually just thinking about Python+Connexion where Connexion implicitly links the endpoint to the operation via Flask under the hood. The operationId
can be exactly matched to the packages down to the method name.
Since OpenAPI just enforces the operationId
to be a unique string and it doesn't necessarily have to be associated with its implementation code, we could probably just start with Python+Connexion for now and either disable the feature for other cases or just trigger a search for all references of the operationId in the workspace on Cmd+Click.
This seems pretty limited solution, IMO...
That's a fair conclusion, however, it's often not feasible to support all languages for a new feature right from the start. By starting with Python, we can implement and refine the feature, setting a foundation for further development. This will also allow us to gather feedback and make iterative improvements. Ideally, as the feature proves its value and stability, other contributors from the community can help extend its support to additional languages over time.
Usually OpenAPI spec and source code is maintained in the same repository. It would be a great feature to be able to Cmd+Click the
operationId
of an API endpoint and have VSCode navigate to that method.I am willing to take this up if you think this is a worthwhile feature.