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 Analyzer to infer component schemas from classes #498

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mikhailshilkov
Copy link
Member

Implements ComponentAnalyzer.GenerateSchema which takes either an assembly or a list of component resources and produces a serializable package schema structure. Infers component resources and their dependent types. Here are the features that this PR implements and tests:

  • Inputs
  • Outputs
  • Plain types
  • Boolean, integer, number, string
  • Complex types
  • Nested complex types
  • Self-recursive complex types
  • Mutually recursive complex types
  • Required properties & inputs
  • Component description
  • Complex type description
  • Property description
  • Optional
  • Array
  • Map
  • Asset/Archive
  • Resource reference
  • Discriminated Union
  • Enum
  • Methods
  • References to component in same provider
  • pulumi.Any

Resolve #468 (we'll track missing features in separate issues)

@mikhailshilkov mikhailshilkov requested a review from a team as a code owner February 21, 2025 16:12
@mikhailshilkov mikhailshilkov force-pushed the mikhailshilkov/schema-analyzer branch from 0842767 to 2ab10a8 Compare February 21, 2025 16:21
Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

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

Why does this just return a schema? Don't we need to keep the schema together with construct functions that can implement it

@mikhailshilkov
Copy link
Member Author

Why does this just return a schema? Don't we need to keep the schema together with construct functions that can implement it

This is mostly a utility class, it will be used in a provider implementation similar to this Java one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infer Pulumi schema from implementation of ComponentResource(s)
2 participants