pulumi/developer-docs/Makefile
Pat Gavlin 134d7cb818
[apitype] Add a JSON schema for deployments. (#8002)
This schema can be used to validate the contents of a Pulumi deployment.
If a deployment validates against this schema, it should be considered
syntactically valid, though it may contain certain classes of semantic
errors (e.g. references to unknown resources in dependency lists,
dependency cycles, etc.).

This schema is not yet used for validation in practice and may not be
entirely accurate.

These changes also add this schema (and the schemas on which it depends)
to the developer documentation. jsonschema2md.go has been updated to
support multi-file schemas.
2021-09-21 21:37:06 -07:00

45 lines
1.6 KiB
Makefile

SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
html: Makefile graphics generated_markdown
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
pdf: Makefile graphics generated_markdown
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: graphics generated_markdown clean Makefile
SVG_FILES = \
providers/resource-lifecycle.svg \
architecture/construct.svg \
architecture/create.svg \
architecture/delete-before-replace-graph.svg \
architecture/delete-before-replace.svg \
architecture/import.svg \
architecture/replace.svg \
architecture/same.svg \
architecture/update.svg
%.svg: %.uml
plantuml -tsvg $<
graphics: Makefile $(SVG_FILES)
MD_FILES = \
architecture/deployment-schema.md \
providers/metaschema.md
generated_markdown: Makefile $(MD_FILES)
providers/metaschema.md: utils/jsonschema2md.go ../pkg/codegen/schema/pulumi.json
go run ./utils/jsonschema2md.go < ../pkg/codegen/schema/pulumi.json >providers/metaschema.md
architecture/deployment-schema.md: utils/jsonschema2md.go ../sdk/go/common/apitype/*.json
go run ./utils/jsonschema2md.go -title "Deployment Schema" -ids "https://github.com/pulumi/pulumi/blob/master/sdk/go/common/apitype/deployments.json=-,https://github.com/pulumi/pulumi/blob/master/sdk/go/common/apitype/resources.json=../sdk/go/common/apitype/resources.json,https://github.com/pulumi/pulumi/blob/master/sdk/go/common/apitype/property-values.json=../sdk/go/common/apitype/property-values.json" <../sdk/go/common/apitype/deployments.json >architecture/deployment-schema.md
clean:
rm -rf $(BUILDDIR)/*