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
Summary:
* `controller-gen` can now run without crashing
* all nested enums and structs are pulled out and named
* we generate names for everything that is named in a schema, not just structs/enums
* nomenclature should be a bit clearer
----
Details;
* `DefinitionName` renamed to `TypeName`
* `Definition` interface renamed to `TypeDefiner` (golangy!) and simplified, it has the `TypeName` of the type it is defining and the `Type` that it will be bound to. `AsDeclarations` is on this type.
- Add `SimpleTypeDefiner` for when we want to give names to simple types that aren't structs/enums. This is functionality we didn't have before (see next point as well).
* `CreateRelatedDefinitions` is renamed and split/massaged to `CreateDefinitions` which will create both the primary definition and any associated definitions.
This latter thing fixes a few issues:
- previously we only named structs & enums. now a `refHandler` can give a name to anything like a map, etc (this is actually used a lot).
- removes the special-casing of structs that we had in `refHandler` and at the root node
- removes the mutation of `canonicalName` in `EnumType`
- this is also necessary to enforce that internal structs are always named, which is needed to actually run controller-gen properly.
* There is also `CreateInternalDefinitions` which walks the innards of a type and creates any enums/structs that must be named in order to be used. With this change `controller-gen` can now generate CRDs without crashing.
Define the items in the spec for the 3 entities
**Done criteria **
The Spec defines all the parameters that the user can pass to create these entities.
User story reference*
#98
The text was updated successfully, but these errors were encountered: