-
Notifications
You must be signed in to change notification settings - Fork 222
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
Libpod (Podman REST API) spec can't be parsed #4834
Comments
This is a curious one. The OpenAPI description parses fine with our parser: hidi validate -d https://storage.googleapis.com/libpod-master-releases/swagger-latest.yaml
info: Microsoft.OpenApi.Hidi.Handlers.ValidateCommandHandler[0]
=> Calculating statistics
Path Items: 165
Operations: 173
Parameters: 480
Request Bodies: 33
Responses: 173
Links: 0
Callbacks: 0
Schemas: 3350 but trying to parse this with the Kiota gives the same error kiota show -d https://storage.googleapis.com/libpod-master-releases/swagger-latest.yaml
crit: Kiota.Builder.KiotaBuilder[0]
error showing the description: Specified argument was out of the range of valid values. (Parameter 'source') |
This issue is caused by the use of the x-logo:
- url: https://raw.githubusercontent.com/containers/libpod/main/logo/podman-logo.png
- altText: Podman logo However, we were expecting an object, not an array, and we don't support altText x-logo:
url: https://raw.githubusercontent.com/containers/libpod/main/logo/podman-logo.png We recently started using x-logo in some of our own projects and unfortunately, nobody has registered the extension here. https://spec.openapis.org/registry/extension/index.html to describe what it is supposed to look like. Thanks for reporting this, we will work on fixing it, and getting a registration published. If someone else doesn't do it first :-) |
I authored a pull request that only adds the plugins extensions when generating plugins, this should reduce the blast radius. #4840 |
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Nuget tool
Client library/SDK language
Csharp
Describe the bug
I am trying to generate a C# client from the official Libpod OpenAPI specification via the following command:
kiota generate -l CSharp --log-level trace --output ./ --namespace-name LibpodSharp --class-name LibpodSharpApiClient --exclude-backward-compatible --openapi https://storage.googleapis.com/libpod-master-releases/swagger-latest.yaml
Expected behavior
The expected behavior would be for the generate command to succeed, as the OpenAPI spec is clearly correct and renders perfectly on
editor.swagger.io
.How to reproduce
Install the Kiota global .NET tool.
Run the command given above.
Open API description file
https://storage.googleapis.com/libpod-master-releases/swagger-latest.yaml
Kiota Version
1.15.0+b535a94064cd8c14a022aaba42964467d5db525a
Latest Kiota version known to work for scenario above?(Not required)
No response
Known Workarounds
Haven't found any workaround yet.
Configuration
Doubt there's anything that specifically has to do with my configuration.
The output of
dotnet --info
:Debug output
Click to expand log
``` trce: Kiota.Builder.KiotaBuilder[0] configuration: {"Generation":{"ShouldGetApiManifest":false,"SkipGeneration":false,"Operation":null,"OpenAPIFilePath":"https://storage.googleapis.com/libpod-master-releases/swagger-latest.yaml","ApiManifestPath":"/home/kanpov/.tmp/apimanifest.json","OutputPath":"/home/kanpov/.tmp/./","ClientClassName":"LibpodSharpApiClient","ClientNamespaceName":"LibpodSharp","NamespaceNameSeparator":".","ModelsNamespaceName":"LibpodSharp.models","Language":0,"PluginTypes":[],"ApiRootUrl":null,"UsesBackingStore":false,"ExcludeBackwardCompatible":true,"IncludeBackwardCompatible":false,"IncludeAdditionalData":true,"Serializers":["Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory","Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory","Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory","Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory"],"Deserializers":["Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory","Microsoft.Kiota.Serialization.Text.TextParseNodeFactory","Microsoft.Kiota.Serialization.Form.FormParseNodeFactory"],"ShouldWriteNamespaceIndices":false,"ShouldWriteBarrelsIfClassExists":false,"CleanOutput":false,"StructuredMimeTypes":["application/json","text/plain;q=0.9","application/x-www-form-urlencoded;q=0.2","multipart/form-data;q=0.1"],"IncludePatterns":[],"ExcludePatterns":[],"PatternsOverride":[],"ClearCache":false,"DisabledValidationRules":[],"MaxDegreeOfParallelism":-1,"IsPluginConfiguration":false,"DisableSSLValidation":false},"Search":{"APIsGuruListUrl":"https://raw.githubusercontent.com/APIs-guru/openapi-directory/gh-pages/v2/list.json","GitHub":{"AppId":"Iv1.9ed2bcb878c90617","ApiBaseUrl":"https://api.github.com","BlockListUrl":"https://raw.githubusercontent.com/microsoft/kiota/main/resources/index-block-list.yml","AppManagement":"https://aka.ms/kiota/install/github"},"ClearCache":false},"Download":{"OutputPath":"./output/result.json","CleanOutput":false,"DisableSSLValidation":false,"ClearCache":false},"Languages":{"CLI":{"MaturityLevel":1,"Dependencies":[{"Name":"Microsoft.Kiota.Abstractions","Version":"1.9.0"},{"Name":"Microsoft.Kiota.Http.HttpClientLibrary","Version":"1.4.3"},{"Name":"Microsoft.Kiota.Serialization.Form","Version":"1.2.4"},{"Name":"Microsoft.Kiota.Serialization.Json","Version":"1.3.3"},{"Name":"Microsoft.Kiota.Authentication.Azure","Version":"1.1.7"},{"Name":"Microsoft.Kiota.Serialization.Text","Version":"1.2.2"},{"Name":"Microsoft.Kiota.Cli.Commons","Version":"1.1.1"}],"DependencyInstallCommand":"dotnet add package {0} --version {1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"CSharp":{"MaturityLevel":2,"Dependencies":[{"Name":"Microsoft.Kiota.Abstractions","Version":"1.9.0"},{"Name":"Microsoft.Kiota.Http.HttpClientLibrary","Version":"1.4.3"},{"Name":"Microsoft.Kiota.Serialization.Form","Version":"1.2.4"},{"Name":"Microsoft.Kiota.Serialization.Json","Version":"1.3.3"},{"Name":"Microsoft.Kiota.Authentication.Azure","Version":"1.1.7"},{"Name":"Microsoft.Kiota.Serialization.Text","Version":"1.2.2"},{"Name":"Microsoft.Kiota.Serialization.Multipart","Version":"1.1.5"}],"DependencyInstallCommand":"dotnet add package {0} --version {1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Go":{"MaturityLevel":2,"Dependencies":[{"Name":"github.com/microsoft/kiota-abstractions-go","Version":"v1.6.0"},{"Name":"github.com/microsoft/kiota-http-go","Version":"v1.4.1"},{"Name":"github.com/microsoft/kiota-serialization-form-go","Version":"v1.0.0"},{"Name":"github.com/microsoft/kiota-serialization-json-go","Version":"v1.0.7"},{"Name":"github.com/microsoft/kiota-authentication-azure-go","Version":"v1.0.2"},{"Name":"github.com/microsoft/kiota-serialization-text-go","Version":"v1.0.0"},{"Name":"github.com/microsoft/kiota-serialization-multipart-go","Version":"v1.0.0"}],"DependencyInstallCommand":"go get {0}@{1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Java":{"MaturityLevel":2,"Dependencies":[{"Name":"com.microsoft.kiota:microsoft-kiota-abstractions","Version":"1.1.13"},{"Name":"com.microsoft.kiota:microsoft-kiota-http-okHttp","Version":"1.1.13"},{"Name":"com.microsoft.kiota:microsoft-kiota-serialization-form","Version":"1.1.13"},{"Name":"com.microsoft.kiota:microsoft-kiota-serialization-json","Version":"1.1.13"},{"Name":"com.microsoft.kiota:microsoft-kiota-authentication-azure","Version":"1.1.13"},{"Name":"com.microsoft.kiota:microsoft-kiota-serialization-text","Version":"1.1.13"},{"Name":"com.microsoft.kiota:microsoft-kiota-serialization-multipart","Version":"1.1.13"},{"Name":"jakarta.annotation:jakarta.annotation-api","Version":"3.0.0"}],"DependencyInstallCommand":"{0}:{1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"PHP":{"MaturityLevel":2,"Dependencies":[{"Name":"microsoft/kiota-abstractions","Version":"1.4.0"},{"Name":"microsoft/kiota-http-guzzle","Version":"1.3.0"},{"Name":"microsoft/kiota-serialization-json","Version":"1.3.0"},{"Name":"microsoft/kiota-authentication-phpleague","Version":"1.1.0"},{"Name":"microsoft/kiota-serialization-text","Version":"1.1.0"},{"Name":"microsoft/kiota-serialization-multipart","Version":"1.0.0"},{"Name":"microsoft/kiota-serialization-form","Version":"1.1.1"}],"DependencyInstallCommand":"composer require {0}:{1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Python":{"MaturityLevel":2,"Dependencies":[{"Name":"microsoft-kiota-abstractions","Version":"1.3.3"},{"Name":"microsoft-kiota-http","Version":"1.3.1"},{"Name":"microsoft-kiota-serialization-json","Version":"1.2.0"},{"Name":"microsoft-kiota-authentication-azure","Version":"1.0.0"},{"Name":"microsoft-kiota-serialization-text","Version":"1.0.0"},{"Name":"microsoft-kiota-serialization-form","Version":"0.1.0"},{"Name":"microsoft-kiota-serialization-multipart","Version":"0.1.0"}],"DependencyInstallCommand":"pip install {0}=={1}","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Ruby":{"MaturityLevel":0,"Dependencies":[{"Name":"microsoft_kiota_abstractions","Version":"0.14.4"},{"Name":"microsoft_kiota_faraday","Version":"0.15.0"},{"Name":"microsoft_kiota_serialization_json","Version":"0.9.1"},{"Name":"microsoft_kiota_authentication_oauth","Version":"0.8.0"}],"DependencyInstallCommand":"gem install \u0022{0}\u0022 -v \u0022{1}\u0022","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"Swift":{"MaturityLevel":0,"Dependencies":[],"DependencyInstallCommand":"","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]},"TypeScript":{"MaturityLevel":1,"Dependencies":[{"Name":"@microsoft/kiota-abstractions","Version":"1.0.0-preview.54"},{"Name":"@microsoft/kiota-http-fetchlibrary","Version":"1.0.0-preview.53"},{"Name":"@microsoft/kiota-serialization-form","Version":"1.0.0-preview.43"},{"Name":"@microsoft/kiota-serialization-json","Version":"1.0.0-preview.54"},{"Name":"@microsoft/kiota-authentication-azure","Version":"1.0.0-preview.49"},{"Name":"@microsoft/kiota-serialization-text","Version":"1.0.0-preview.51"},{"Name":"@microsoft/kiota-serialization-multipart","Version":"1.0.0-preview.32"}],"DependencyInstallCommand":"npm install {0}@{1} -SE","ClientClassName":"","ClientNamespaceName":"","StructuredMimeTypes":[]}},"Update":{"OrgName":"microsoft","RepoName":"kiota","Disabled":false}} dbug: Kiota.Builder.KiotaBuilder[0] kiota version 1.15.0 dbug: Kiota.Builder.KiotaBuilder[0] cache file /tmp/kiota/cache/generation/B0C5AF71B5E0E87A7711C27ADCCF465701E7A63933C31F30D39A7E7BA86EA38B/swagger-latest.yaml is up to date and clearCache is False, using it info: Kiota.Builder.KiotaBuilder[0] loaded description from remote source trce: Kiota.Builder.KiotaBuilder[0] 17ms: Read OpenAPI file https://storage.googleapis.com/libpod-master-releases/swagger-latest.yaml dbug: Kiota.Builder.KiotaBuilder[0] step 1 - reading the stream - took 00:00:00.0196768 trce: Kiota.Builder.KiotaBuilder[0] Parsing OpenAPI file crit: Kiota.Builder.KiotaBuilder[0] error generating the client: Specified argument was out of the range of valid values. (Parameter 'source') ```Other information
No response
The text was updated successfully, but these errors were encountered: