Commit Graph

20 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
Thomas Scholtes
59ec184c81
Fix Kubernetes version for which to get swagger
For now I think it is sufficient to hardcode this. We can come up with a
better schema later.
2018-07-13 21:53:29 +02: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
Fabrizio Ferrai
5654473c89 Fix incorrect generation of lambdas with no arguments 2018-06-01 11:36:53 +02:00
Fabrizio Ferrai
81988ee413 Correctly generate List 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
Fabrizio Ferrai
7b76a392a7 Move all types to the aptly named folder 2018-05-27 19:55:47 +02:00
Fabrizio Ferrai
3bc83febc2 Make script executable 2018-05-27 19:55:47 +02:00
Fabrizio Ferrai
6c11202b83 Properly format records 2018-05-27 19:55:47 +02:00
Fabrizio Ferrai
368cd558be Switch from assigning generic types to association lists for objects
See https://github.com/dhall-lang/dhall-json/pull/29
2018-05-27 19:55:47 +02:00
Fabrizio Ferrai
8056257892 Revert back to generating a flat directory 2018-05-27 19:55:47 +02:00
Arian van Putten
9e921e0298 Directories 2018-02-02 02:25:10 +01:00
Arian van Putten
6283642405 Fix for single valued types 2018-02-02 02:12:14 +01:00
Arian van Putten
d7f040f2b3 Dhall kube 2017-09-20 15:21:58 +02:00