Skip to content

swiftkube/modelgen

Repository files navigation

Swiftkube:ModelGen

Kuberentes API resources model generator for Swiftkube:Model

Overview

This tool converts Kuberentes JSON schema definitions into Swift structs using Stencil templates. The JSON definitions are mapped from their openAPI counterparts via openapi2jsonschema.

Non-goals:

  • Performance
  • Reusability
  • Clean code

Build

Clone this repository and run:

swift build

Usage

Run the script:

swiftkube-modelgen --api-version v1.18.9 --templates templates/model --output <path for generated model>