Commit Graph

11 Commits

Author SHA1 Message Date
Fabrizio Ferrai
4fec2167a8
Support 'format' key from the swagger schema (#28)
Fix #12 by introducing a `< Int : Natural | String : Text >` Union for the "int-or-string" format key.
2018-08-06 17:13:33 +02:00
Thomas Scholtes
1dafd97c09 Improve convert code and fix alias issues (#25)
We improve the convert code by rewriting the `get_typ`. It is now more
general and properly recurses on records and lists. This also surfaced a
bug where definition aliases did not generate correct code.
2018-07-14 11:10:37 +03:00
Fabrizio Ferrai
bc09fbe1b4
Fix $ in record labels: start emitting quoted ones (#22) 2018-07-11 18:35:11 +02:00
Fabrizio Ferrai
6acb5b3e18 Update to Dhall 1.14
Switch Integer to Natural
2018-07-08 20:47:09 +03:00
Thomas Scholtes
1feeeac87a
Default kind and apiVersion values
The `kind` and `apiVersion` properties of a Kubernetes resource are
already implicitly determined by the resource. We adjust the default
functions so that they do not require the `kind` and `apiVersion`
parameters for resources.

We obtain the implied values by inspecting the
`x-kubernetes-group-version-kind` key from the OpenAPI schema for that
resource. The [Kubernetes OpenAPI Spec Readme][1] explains how these
values determine the resource values.

[1]: https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/README.md#x-kubernetes-group-version-kind
2018-07-08 11:34:03 +02:00
Thomas Scholtes
6f4b1b32fd
Regenerate code from OpenAPI spec 2018-07-08 11:28:21 +02:00
Fabrizio Ferrai
03c99940c9 Regenerate defaults and types 2018-06-01 11:36:53 +02:00
Fabrizio Ferrai
ae66b56518 Fix record types and empty records formatting 2018-05-27 19:55:47 +02:00
Fabrizio Ferrai
7c895cea21 Add types to generated default records 2018-05-27 19:55:47 +02:00
Fabrizio Ferrai
65b1339651 Make the required parameters fields of a record instead of fn args 2018-05-27 19:55:47 +02:00
Fabrizio Ferrai
01d8ec40e3 Start generating default values for all models 2018-05-27 19:55:47 +02:00