Closed maisarissi closed 6 months ago
Looks like the extension shows/sends /repos/{org-id}/{repo-id}#GET
as the include pattern while the openapi description has the path as /repos/{owner}/{repo}#GET
(this is due to the path deduplication logic by kiota).
Authored https://github.com/microsoft/kiota/pull/4722 to resolve the issue with the indexer cleanup logic that doesn't add a wildcard for the last indexer.
@andrueastman will this fix the extension showing the wrong path?
FYI @ElinorW
The extension will show the deduplicated paths /repos/{org-id}/{repo-id}
this is because the document has some paths as
/repos/{owner}/{repo}
and others as /repos/{template_owner}/{template_repo}
. So Kiota will deduplicate them to avoid having multiple branches as that is ambiguous from an openaApi standpoint.
This is similar to the scenario to the test at https://github.com/microsoft/kiota/blob/96a9bef79fffc8c5b54132999b7e6851dedef093/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs#L911
What are you generating using Kiota, clients or plugins?
Kiota plugin
In what context or format are you using Kiota?
Windows executable
Client library/SDK language
None
Describe the bug
I'm able to search and find the GitHub OpenAPI description and select the endpoints I care about, which are:
When trying to generate an "API Plugin" for the above endpoints, I got the following error:
In the output folder, both generated files (plugin and sliced openapi) are wrong. Plugin file has no functions nor runtimes objects.
The sliced OpenAPI description has no "paths".
Using the same extension version I'm able to correctly generate an API Plugin for other GitHub endpoints, like
/search
node. Also, after getting the above error, I'm not able to load a new OpenAPI description. For that, I need to close and reopen VS Code.Expected behavior
I should be able to generate an API plugin with functions and runtime for the selected endpoints as well as have a sliced OpenAPI description with only the selected endpoints in the paths
How to reproduce
Just try to generate a plugin for all the following endpoints:
Open API description file
No response
Kiota Version
plugin feature
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
No response
Configuration
No response
Debug output
Click to expand log
```Other information
No response