https://github.com/cloudy-sky-software/pulschema
Pul(umi) schema from API specs
https://github.com/cloudy-sky-software/pulschema
Last synced: 10 months ago
JSON representation
Pul(umi) schema from API specs
- Host: GitHub
- URL: https://github.com/cloudy-sky-software/pulschema
- Owner: cloudy-sky-software
- License: other
- Created: 2022-10-16T04:14:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-14T17:05:19.000Z (10 months ago)
- Last Synced: 2025-08-14T19:11:47.461Z (10 months ago)
- Language: Go
- Homepage: https://buttondown.email/css-blog/archive/create-a-pulumi-provider-from-openapi-spec/
- Size: 647 KB
- Stars: 19
- Watchers: 4
- Forks: 4
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pulumi - `cloudy-sky-software/pulschema` - Library for developing native providers from OpenAPI specs (Libraries / Miscellaneous)
README
# Pulschema
Pul(umi) schema from API specs. Learn how to generate a provider using this library: https://buttondown.email/css-blog/archive/create-a-pulumi-provider-from-openapi-spec/.
Use the [template repo](https://github.com/cloudy-sky-software/pulumi-provider-template) to get started quickly.
## What Is This?
This module is a library that can convert an OpenAPI spec to a Pulumi schema spec.
From there, using Pulumi's codegen tools, one can generate the necessary language
SDKs for a provider.
## Features
- Handles discriminated types
- Handles `AllOf`, `OneOf`, `AnyOf`
- Creates a metadata map for resource type tokens that map to CRUD operations
- Generates schema for Pulumi functions, aka invokes, from `GET` methods
- Maps path params as required inputs in the resource schema for easier mapping of inputs
to HTTP requests
## OpenAPI Conformance
This library does not convert OpenAPI specs without certain required modifications.
That is, you'll need to standardize your OpenAPI spec with the following rules.
This is required since the OpenaPI docs created by cloud providers aren't always perfect.
**NEW**: Refer to the [conformance repo](https://github.com/cloudy-sky-software/cloud-provider-api-conformance) for the rules related to the OpenAPI spec.
## Credits
This library would not be possible without these wonderful creations.
- https://github.com/getkin/kin-openapi - Used by the core of this library to parse and walk-through the OpenAPI doc.
- https://github.com/pulumi/pulumi-aws-native - Served as an example of a native Pulumi provider that has solved some problems.
- https://github.com/pulumi/pulumi-kubernetes - Served as a source for how to approach the conversion from OpenAPI to
Pulumi schema.