Open uri200 opened 2 years ago
Using the same command I also can see that complex constructions with anyOf is not supported properly. For example, on that schema I mentioned we have something like
TrafficInfluSub:
allOf:
- oneOf:
- required:
- afAppId
- required:
- trafficFilters
- required:
- ethTrafficFilters
- oneOf:
- required:
- ipv4Addr
- required:
- ipv6Addr
- required:
- macAddr
- required:
- gpsi
- required:
- externalGroupId
- required:
- anyUeInd
anyOf:
- not:
required:
- subscribedEvents
- required:
- notificationDestination
But when we generated the client with go we get the following object
// TrafficInfluSub Represents a traffic influence subscription.
type TrafficInfluSub struct {
OneOfAnyTypeAnyTypeAnyType *OneOfAnyTypeAnyTypeAnyType
OneOfAnyTypeAnyTypeAnyTypeAnyTypeAnyTypeAnyType *OneOfAnyTypeAnyTypeAnyTypeAnyTypeAnyTypeAnyType
}
Bug Report Checklist
Description
We are generating client specs for go using 5g 3gpp swagger specs found here (https://raw.githubusercontent.com/jdegre/5GC_APIs/master/TS29522_TrafficInfluence.yaml)
Running gofmt you will see the files have some errors
For example the type
Interface{}
is used twice on the definition. While t should define a sere of properies.This is how it should look like (extracted from the server case)
openapi-generator version
6.0.0
Generation Details
Steps to reproduce
Just run that command and it will generate the files
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/12955
Suggest a fix