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
It's interesting that the errors are limited to this specific model and this specific file. In this case, the file name (CodeScanningVariantAnalysis) minus the extension, is appearing in the file in place of the type name (CodeScanningVariantAnalysisStatus) and a simple find/replace in that file will cause the build to succeed without errors.
Expected behavior
I expect go build ./... to succeed without any output.
Using Kiota v1.15.0, run generation like so: kiota generate -l go --ll trace -o $(pwd)/temp -n github.com/octokit/temp -d schemas/downloaded.json --ebc
Change into wherever you generated your code: cd temp
Create a Go module from the generated code: go mod init github.com/octokit/temp && go mod tidy
Latest Kiota version known to work for scenario above?(Not required)
v1.14.0
Known Workarounds
Downgrade to Kiota v1.14.0
Use a find/replace step after building to replace the filename with the correct type name inside the file
Configuration
This occurs on any x64-based Ubuntu-derivative system (e.g. GitHub Actions, though that is also my local dev environment). I do not know if it's specific to this configuration.
Debug output
N/A
Other information
N/A
The text was updated successfully, but these errors were encountered:
After taking a look a look at this, the issue seems to be caused by the fact that the models namespace has two enums codeScanningVariantAnalysisStatus and codeScanningVariantAnalysis_status which would ideally end up being generated to individual files.
However, the go file path segmenter ends up producing the same file name for both enums after calling the ToSnakeCase method which is code_scanning_variant_analysis.go and therefore only one of the files/enums ends up being written. leading to the other reference missing.
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
Go
Describe the bug
(Please see reproduction steps below)
Kiota version: v1.15.0
Build error:
It's interesting that the errors are limited to this specific model and this specific file. In this case, the file name (CodeScanningVariantAnalysis) minus the extension, is appearing in the file in place of the type name (CodeScanningVariantAnalysisStatus) and a simple find/replace in that file will cause the build to succeed without errors.
Expected behavior
I expect
go build ./...
to succeed without any output.How to reproduce
Reproduction steps:
kiota generate -l go --ll trace -o $(pwd)/temp -n github.com/octokit/temp -d schemas/downloaded.json --ebc
cd temp
go mod init github.com/octokit/temp && go mod tidy
go build ./...
Open API description file
https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.git.luolix.top.json
Kiota Version
v1.15.0
Latest Kiota version known to work for scenario above?(Not required)
v1.14.0
Known Workarounds
Configuration
This occurs on any x64-based Ubuntu-derivative system (e.g. GitHub Actions, though that is also my local dev environment). I do not know if it's specific to this configuration.
Debug output
N/A
Other information
N/A
The text was updated successfully, but these errors were encountered: