swagger-api / swagger-api/swagger-codegen
[Go] Client Generated Code: Type is incorrect
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Downloaded the Go Client Code from https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/master/Mp1.yaml
Example: Types of below listed attributes should be string, but it is empty structure in the generated code.
type ServiceInfoSerName struct {
}
type ServiceInfoTransportId struct {
}
// Service version
type ServiceInfoVersion struct {
}
Swagger-codegen version
Note sure. How to find?
We got the code from https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/master/Mp1.yaml
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
Type should be like this:
type ServiceInfoSerName string
type ServiceInfoTransportId string
type ServiceInfoVersion string
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Mp1.yaml definition linked in the issue and compare its ServiceInfo attributes with the generated Go declarations for ServiceInfoSerName, ServiceInfoTransportId, and ServiceInfoVersion. Trace the Swagger Editor/code-generation path used by the report and verify that these attributes generate as string aliases rather than empty structs; no local files or tests are named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100