We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug It seems that it's not possible to use custom methods in endpoint paths.
To Reproduce
@api({ name: "test", version: "1" }) class Api {} @endpoint({ method: "POST", path: "/items/:id:run", }) class RunItem { @request request( @pathParams pathParams: { id: string; } ) {} @response({ status: 202 }) successfulResponse() {} }
Running spot generate --contract src/contract/api.ts --language yaml --generator openapi3 --out tst/ throws an error:
spot generate --contract src/contract/api.ts --language yaml --generator openapi3 --out tst/
Error: endpoint path dynamic components must have a corresponding path param defined in @request. Violating path components: id:run
I think it's because this function for the example above will return ['id:run'] and this string is then expected to be defined in pathParams.
['id:run']
pathParams
Expected behavior To generate openapi spec without an error.
Desktop:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
It seems that it's not possible to use custom methods in endpoint paths.
To Reproduce
Running
spot generate --contract src/contract/api.ts --language yaml --generator openapi3 --out tst/
throws an error:I think it's because this function for the example above will return
['id:run']
and this string is then expected to be defined inpathParams
.Expected behavior
To generate openapi spec without an error.
Desktop:
The text was updated successfully, but these errors were encountered: