-
Notifications
You must be signed in to change notification settings - Fork 76
Labels
Description
Description
When generating an OpenAPI spec using Dev Proxy, the following errors are shown:
fail No messages found in the prompt file: /Users/waldek/github/dotnet/dev-proxy/DevProxy/bin/Debug/net9.0/prompts/api_operation_id.prompty
fail No messages found in the prompt file: /Users/waldek/github/dotnet/dev-proxy/DevProxy/bin/Debug/net9.0/prompts/api_operation_description.prompty
Additionally, the following error is shown regarding the configuration:
fail Plugin configuration validation failed with the following errors: Property 'includeParameters' has not been defined and the schema does not allow additional properties. Path 'includeParameters', line 6, position 24.
Expected behaviour
No errors should occur when generating an OpenAPI spec.
Actual behaviour
Errors as described above occur when generating an OpenAPI spec.
Steps to reproduce
- Use the following
devproxyrc.json
:
{
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/rc.schema.json",
"plugins": [
{
"name": "OpenApiSpecGeneratorPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/DevProxy.Plugins.dll",
"configSection": "openApiSpecGeneratorPlugin"
}
],
"urlsToWatch": [
"*"
],
"openApiSpecGeneratorPlugin": {
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v1.0.0/openapispecgeneratorplugin.schema.json",
"includeOptionsRequests": false,
"specVersion": "v3_0",
"specFormat": "Json",
"includeParameters": [
"api-version"
]
},
"logLevel": "information",
"newVersionNotification": "stable",
"showSkipMessages": true,
"asSystemProxy": false
}
- Start recording
- Run:
curl -ikx http://127.0.0.1:8000 https://jsonplaceholder.typicode.com/posts?api-version=123
- Stop recording
Output:
fail Plugin configuration validation failed with the following errors: Property 'includeParameters' has not been defined and the schema does not allow additional properties. Path 'includeParameters', line 6, position 24.
info Dev Proxy API listening on http://127.0.0.1:8897...
info Dev Proxy listening on 127.0.0.1:8000...
info Configure your application to use this proxy's port and address
Hotkeys: issue (w)eb request, (r)ecord, (s)top recording, (c)lear screen
Press CTRL+C to stop Dev Proxy
◉ Recording...
req ╭ GET https://jsonplaceholder.typicode.com/posts?api-version=123
time │ 14/07/2025 06:35:00 +00:00
pass ╰ Passed through
○ Stopped recording
info Creating OpenAPI spec from recorded requests...
fail No messages found in the prompt file: /Users/waldek/github/dotnet/dev-proxy/DevProxy/bin/Debug/net9.0/prompts/api_operation_id.prompty
fail No messages found in the prompt file: /Users/waldek/github/dotnet/dev-proxy/DevProxy/bin/Debug/net9.0/prompts/api_operation_description.prompty
info Created OpenAPI spec file jsonplaceholder.typicode.com-20250714083503.json
info DONE
Dev Proxy Version
Latest from main
Operating system (environment)
macOS
Shell
zsh
Configuration file
See devproxyrc.json
above.
Additional Info
- .NET version: 9.0
- Plugin: OpenApiSpecGeneratorPlugin
- The referenced prompt files are missing.
- The config property 'includeParameters' is rejected by the schema.
- Reported by @waldekmastykarz