Closed
Description
Description
The description document created using the OpenAPI spec generator plugin doesn't appear to create valid documents as it's using an invalid data type. The generated document doesn't pass multiple validators (such as this one and this one).
Expected behaviour
- Update the Dev Proxy config to add support for the OpenApiSpecGeneratorPlugin.
- Record a request using the following URL:
https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos?api_key=DEMO_KEY&sol=1000&camera=MAST
- Load the generated JSON file generated by the Dev Proxy into one of the validators - it should pass.
- Using the VSCode Teams Toolkit, create a new project using the following options:
- Message Extension > Custom Search Results > Start with an OpenAPI Description Document
- When prompted, select the JSON file generated by the Dev Proxy.
- Select the only path in the description document & let the TTK wizard complete the project creation process.
Actual behaviour
When repeating the process above...
- when validating the JSON file generated by the Dev Proxy, it fails
- when selecting the JSON file generated by the Dev Proxy during the process of creating a new project using the TTK, it fails and displays errors in the terminal:
Summary:
1 failed.
(×) Error: No supported API found in the OpenAPI document.
For more information visit: "https://aka.ms/build-api-based-message-extension".
Reasons for API incompatibility are listed below:
GET /mars-photos/api/v1/rovers/curiosity/photos: response json is empty
Steps to reproduce
Noted above in Expected behavior process
Dev Proxy Version
0.19.0
Operating system (environment)
macOS
Shell
zsh
Configuration file
{
"$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.19.0/rc.schema.json",
"plugins": [
{
"name": "RetryAfterPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll"
},
{
"name": "GenericRandomErrorPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll",
"configSection": "genericRandomErrorPlugin"
},
{
"name": "OpenApiSpecGeneratorPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll"
}
],
"urlsToWatch": [
"https://jsonplaceholder.typicode.com/*",
"https://api.nasa.gov/*"
],
"genericRandomErrorPlugin": {
"errorsFile": "devproxy-errors.json"
},
"rate": 0,
"logLevel": "information",
"newVersionNotification": "stable"
}
Additional Info
No response