You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have no context and no asyncapi file in my work dir I get: ContextError: No context is set as current, please set a current context but should get:
Unable to perform validation. Specify what AsyncAPI file should be validated.
These are your options to specify in the CLI what AsyncAPI file should be used:
- You can provide a path to the AsyncAPI file: asyncapi validate path/to/file/asyncapi.yml
- You can also pass a saved context that points to your AsyncAPI file: asyncapi validate mycontext
- In case you did not specify a context that you want to use, the CLI checks if there is a default context and uses it. To set default context run: asyncapi context use mycontext
- In case you did not provide any reference to AsyncAPI file and there is no default context, the CLI detects if in your current working directory you have files like asyncapi.json, asyncapi.yaml, asyncapi.yml. Just rename your file accordingly.
When I have no context and no asyncapi file in my work dir I get:
ContextError: No context is set as current, please set a current context
but should get:I think we need to pull https://github.com/asyncapi/cli/blob/master/src/errors/validation-error.ts#L19 to more generic error and also fix
cli/src/models/SpecificationFile.ts
Line 43 in b9cc938
more details #130 (comment)
The text was updated successfully, but these errors were encountered: