azure-service-operator
azure-service-operator copied to clipboard
Use Swagger as sole input
trafficstars
nothing to see here, WIP
Changes
Note that this time around I reduced scope to try to do the minimal amount to change over to Swagger-only. We can always improve the naming conventions in a fresh PR.
Naming changes
- Now allow
_in names. This is contra established Golang guidelines, but they don't appear in CRDs and being able to separate names makes a significant difference in readability when we generate long names due to multiple layers of unnamed nested objects. This also avoids generating clashes when RP Swagger uses_in some types. - Use
_to separate enum name from enum value in enum value identifiers. (e.g.SkuName_Standard_LRS) - Use
_STATUSas status-type suffix to avoid generating collisions with_Statusnames that are generated due to properties etc. - When generating names based upon
_STATUSnames, ensure that the suffix is kept at the end of the name, instead of being embedded when adding more parts onto the end. - Spec types are now correctly singularized, matching the resource type.
Improvements
Locationproperty disappears from several places that it was not needed. (RoleAssignment, globalMariaDB, …)- Some other properties that were documented as "doing nothing" have disappeared.
- Most names have gotten better, a few have gotten worse.
VirtualMachineScaleSets_Spec_Properties_VirtualMachineProfile_NetworkProfile_NetworkInterfaceConfigurations_Properties_IpConfigurationsis nowVirtualMachineScaleSetIPConfiguration
Remaining work
- [x] add
Idproperty to all status types (?) - [x] figure out why extension types aren't triggering/working properly
- [ ] restore cross-resource-references functionality
- [ ] review all
donotmerge, including config file
Getting close now, a few compilation errors in tests.
Currently stuck awaiting a workaround for go compiler bug... 🤦