Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[schema] Add the Pulumi Package metaschema. #7952

Merged
merged 1 commit into from
Sep 20, 2021
Merged

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Sep 10, 2021

The Pulumi Package metaschema is a JSON schema definition that describes
the format of a Pulumi Package schema. The metaschema can be used to
validate certain basic properties of a Pulumi Package schema, including
(but not limited to):

  • data types (e.g. is this property a string?)
  • data formats (e.g. is this string property a valid regex?)
  • object shapes (e.g. is this object missing required properties?)

The schema binder has been updated to use the metaschema as its first
validation pass.

In addition to its use in the binder, the metaschema has its own page in
the developer documentation. This page is generated using a small tool,
jsonschema2md.go.

@github-actions
Copy link

Diff for pulumi-random with merge commit 3ee124d

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 3ee124d

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 3ee124d

@github-actions
Copy link

Diff for pulumi-aws with merge commit 3ee124d

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 3ee124d

@github-actions
Copy link

Diff for pulumi-azure with merge commit 3ee124d

@github-actions
Copy link

Diff for pulumi-azuread with merge commit a145d07

@github-actions
Copy link

Diff for pulumi-random with merge commit a145d07

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit a145d07

@github-actions
Copy link

Diff for pulumi-gcp with merge commit a145d07

@github-actions
Copy link

Diff for pulumi-aws with merge commit a145d07

@github-actions
Copy link

Diff for pulumi-azure with merge commit a145d07

@t0yv0
Copy link
Member

t0yv0 commented Sep 13, 2021

OK I've read this again. I'm absolutely loving the meta schema. I can consume it - the JSON notation is not the best (give me OCaml type defs) but I can read it fine. We're getting somewhere!

Copy link
Member

@mikhailshilkov mikhailshilkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! A few random comments - let me know if I can help validating it further.

pkg/codegen/schema/pulumi.json Show resolved Hide resolved
pkg/codegen/schema/pulumi.json Outdated Show resolved Hide resolved
pkg/codegen/schema/pulumi.json Outdated Show resolved Hide resolved
"type": "object",
"properties": {
"moduleFormat": {
"description": "A regex that is used by the importer to extract a module name from the module portion of a type token. Packages that use the module format \"namespace1/namespace2/.../namespaceN\" do not need to specify a format. The regex must define one capturing group that contains the module name, which must be formatted as \"namespace1/namespace2/...namespaceN\".",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a known set of supported expressions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle any regex is supported here... are you looking for examples of expressions that are in active use?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? I feel this may be confusing for schema users.

@pgavlin pgavlin requested a review from iwahbe September 16, 2021 21:48
@pgavlin pgavlin marked this pull request as ready for review September 17, 2021 00:20
@github-actions
Copy link

Diff for pulumi-random with merge commit ec932cd

@github-actions
Copy link

Diff for pulumi-azuread with merge commit ec932cd

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit ec932cd

@github-actions
Copy link

Diff for pulumi-gcp with merge commit ec932cd

@github-actions
Copy link

Diff for pulumi-azuread with merge commit dd3578b

@github-actions
Copy link

Diff for pulumi-random with merge commit dd3578b

@github-actions
Copy link

Diff for pulumi-aws with merge commit ec932cd

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit dd3578b

@github-actions
Copy link

Diff for pulumi-aws with merge commit 13fbfa7

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 4e41c79

@github-actions
Copy link

Diff for pulumi-aws with merge commit 4e41c79

@github-actions
Copy link

Diff for pulumi-azure with merge commit 13fbfa7

@github-actions
Copy link

Diff for pulumi-azure with merge commit 4e41c79

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 46a5646

@github-actions
Copy link

Diff for pulumi-random with merge commit 46a5646

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit 46a5646

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 46a5646

@github-actions
Copy link

Diff for pulumi-aws with merge commit 46a5646

@github-actions
Copy link

Diff for pulumi-azure with merge commit 46a5646

The Pulumi Package metaschema is a JSON schema definition that describes
the format of a Pulumi Package schema. The metaschema can be used to
validate certain basic properties of a Pulumi Package schema, including
(but not limited to):

- data types (e.g. is this property a string?)
- data formats (e.g. is this string property a valid regex?)
- object shapes (e.g. is this object missing required properties?)

The schema binder has been updated to use the metaschema as its first
validation pass.

In addition to its use in the binder, the metaschema has its own page in
the developer documentation. This page is generated using a small tool,
jsonschema2md.go.
@github-actions
Copy link

Diff for pulumi-azuread with merge commit ff72a49

@github-actions
Copy link

Diff for pulumi-random with merge commit ff72a49

@github-actions
Copy link

Diff for pulumi-kubernetes with merge commit ff72a49

@github-actions
Copy link

Diff for pulumi-gcp with merge commit ff72a49

@github-actions
Copy link

Diff for pulumi-aws with merge commit ff72a49

@github-actions
Copy link

Diff for pulumi-azure with merge commit ff72a49

@pgavlin pgavlin merged commit 236ce54 into master Sep 20, 2021
@pulumi-bot pulumi-bot deleted the pgavlin/metaschema branch September 20, 2021 19:00
@emiliza emiliza added this to the 0.62 milestone Sep 21, 2021
@emiliza emiliza added area/docs Improvements or additions to documentation kind/engineering Work that is not visible to an external user size/S Estimated effort to complete (1-2 days). labels Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Improvements or additions to documentation kind/engineering Work that is not visible to an external user size/S Estimated effort to complete (1-2 days).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants