-
Notifications
You must be signed in to change notification settings - Fork 261
Added docs for fn::conform #17337
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
base: master
Are you sure you want to change the base?
Added docs for fn::conform #17337
Conversation
Documentation ReviewThank you for adding documentation for the Issues Found1. Missing trailing newline (fn-conform.md:232)The new file Fix: Add a blank line at the end of the file. 2. Inconsistent meta_desc (fn-conform.md:5)The meta description is generic and identical to other built-in functions. It should be specific to Current: meta_desc: Pulumi ESC allows you to compose and manage hierarchical collections of configuration and secrets and consume them in various ways.Suggested: meta_desc: The fn::conform function validates values against JSON Schema in Pulumi ESC environments.3. Table formatting inconsistency (fn-conform.md:27)The parameters table has an inconsistent final column where the description doesn't end with a period, while line 28 does. For consistency with other built-in function docs (like fn-concat.md and fn-fromJSON.md), table descriptions should not end with periods. Current: | `schema` | object | A JSON Schema definition to validate the value against.
| `value` | any | The value to validate.Suggested: | `schema` | object | A JSON Schema definition to validate the value against
| `value` | any | The value to validate4. Repetitive phrasing (fn-conform.md:199, 211, 231)The phrase "The environment cannot be saved" appears three times in the Validation errors section. This becomes repetitive. Consider consolidating or varying the language. Suggested improvement for line 199-200: When a value does not conform to its schema, `fn::conform` raises an error preventing the environment from being saved. This ensures configuration issues are caught before deployment.Then remove "The environment cannot be saved" from lines 211 and 231, as the point has already been established. Line 211 suggestion: This raises an error: `expected string, got number`.Line 231 suggestion: This raises an error indicating that the required field `name` is missing.Positive Aspects
Please address these issues and mention me (@claude) if you'd like another review after making changes. |
|
Your site preview for commit f761340 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17337-f761340b.s3-website.us-west-2.amazonaws.com. |
| values: | ||
| user: | ||
| fn::conform: | ||
| schema: ${user-schema} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, I think using an implicit import is more ergonomic, because it won't merge the schema itself into the current esc environment:
values:
user:
fn::conform:
schema: ${environments.myproj.schemas.user-schema}
|
Your site preview for commit 78e223f is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17337-78e223f9.s3-website.us-west-2.amazonaws.com. |
Proposed changes
Adds new fn::conform built-in function documentation
Unreleased product version (optional)
This might be available in a future esc release.