Skip to content
New issue

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

OpenAPI operations with no input raise errors #10

Closed
lbroudoux opened this issue Jul 26, 2024 · 0 comments
Closed

OpenAPI operations with no input raise errors #10

lbroudoux opened this issue Jul 26, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@lbroudoux
Copy link
Member

lbroudoux commented Jul 26, 2024

Describe the bug

Let's say we have a simple GET /forecasts operations that take no input parameters, it raises an error because it founds no example fragment for inputs. The OpenAPI file is correctmly imported into Microcks and produces functional mock though.

$ spectral lint -r microcks-rules.yaml resources/weather-forecast-openapi.yaml

/Users/laurent/Development/github/microcks-spectral-ruleset/resources/weather-forecast-openapi.yaml
 26:17  warning  microcks-examples-fragments-to-complete-mocks  🚨 Response example 'all' is incomplete, it has no matching input example. It requires at least one requestBody or parameter example with same name to be considered as valid mock for Microcks.  paths./forecast.get.responses

✖ 1 problem (0 errors, 1 warning, 0 infos, 0 hints)

Expected behavior

Spectral linting should no raise errors on that case.

Actual behavior

See above.

How to Reproduce?

See above.

Microcks version or git rev

No response

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

No response

Additional information

The same applies when using Vacuum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant