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

Document validation errors do not display by default #1588

Closed
DavidBiesack opened this issue May 23, 2022 · 3 comments · Fixed by #1594
Closed

Document validation errors do not display by default #1588

DavidBiesack opened this issue May 23, 2022 · 3 comments · Fixed by #1594
Assignees
Labels
fixed generator Issues or improvements relater to generation capabilities. type:bug A broken experience

Comments

@DavidBiesack
Copy link

DavidBiesack commented May 23, 2022

I installed the binary for macos from https://github.com/microsoft/kiota/releases/download/v0.1.3/linux-x64.zip
(expand the zip into ~/lib/kiota) and ran:

$ ~/lib/kiota/kiota -d openapi.yaml -l typescript -o gen/sdk/client

(I also approved the binary download in my macos settings).

This creates the gen/sdk/client directory but nothing else. openapi.yaml is a valid OpenAPI 3.1 source.

I'd like to try this tool with OpenAPI 3.1

Only when I turned on trace log level do I get:

$ ~/lib/kiota/kiota --loglevel trace -d openapi.yaml -l typescript -o gen/sdk/client
...
crit: Kiota.Builder.KiotaBuilder[0]
      error generating the SDK: OpenAPI specification version '3.1.0' is not supported.

Note: Since this is not just a Trace message but a Critical message, it should be printed by default (default log level Warning) without having to use --loglevel trace

@baywet
Copy link
Member

baywet commented May 24, 2022

Hi @DavidBiesack ,
Thanks for reaching out and for trying kiota.
Kiota relies on openapi.net to parse the documents which doesn't support 3.1 yet.
However there are plans to support it, and as soon as a release is out, we'll update it here.

As per the error message, is it not visible until you change the log level?

@DavidBiesack
Copy link
Author

@baywet Thanks for the info. Yes, that is correct. If I do not pass --loglevel trace, no error message is printed.

@baywet baywet added type:bug A broken experience generator Issues or improvements relater to generation capabilities. and removed question needs more information labels May 24, 2022
@baywet baywet added this to Kiota May 24, 2022
@baywet baywet moved this to Todo in Kiota May 24, 2022
@baywet baywet changed the title Add support for OpenAPI 3.1 Document validation errors do not display by default May 24, 2022
@baywet baywet moved this from Todo to In Progress in Kiota May 27, 2022
@baywet
Copy link
Member

baywet commented May 27, 2022

Thanks for the additional information. That helped uncover a bigger than expected bug in the logging of Kiota, I put #1594 together to address that. This issue will be closed when the PR gets merged. Feel free to open other issues if you run into other things.

@baywet baywet added the fixed label May 27, 2022
Repository owner moved this from In Progress to Done in Kiota May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed generator Issues or improvements relater to generation capabilities. type:bug A broken experience
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants