Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define the spec for the SqlDatabase, SqlServer and SqlFirewall entities #107

Closed
jananivMS opened this issue Aug 20, 2019 · 0 comments
Closed
Assignees

Comments

@jananivMS
Copy link
Contributor

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

@jananivMS jananivMS added the task label Aug 20, 2019
Porges added a commit that referenced this issue May 11, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants