ruletypesgen

command
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Command ruletypesgen emits a Terraform Provider Code Specification for the integration-rule families that cannot be generated from the OpenAPI spec.

The Control API models rules as a oneOf + discriminator union, which tfplugingen-openapi cannot handle. Instead we drive generation from the in-repo control rule types, which are already the curated, per-family-correct model: the moderation and before-publish families correctly drop the webhook source/request_mode fields and carry before_publish_config/invocation_mode/chat_room_filter instead.

Structure (the attribute tree, types, optionality, sensitivity) comes from reflecting each rule's XxxRulePost struct. Field descriptions come from the vendored OpenAPI spec (codegen/control-api.yaml), looked up by JSON property name, because the Go structs carry no documentation. The result is a Provider Code Spec JSON that tfplugingen-framework turns into schema and model code. Run via `make generate`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL