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

Fix incorrect string format example in documentation #537

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

youyongsong
Copy link
Contributor

In the current Crossplane documentation, there is an incorrect example for the string formatting. This mistake might cause confusion for developers trying to write composition patches.

The incorrect example is given as:

patches:

  • type: FromCompositeFieldPath
    fromFieldPath: spec.field1
    toFieldPath: metadata.annotations["stringAnnotation"]
    transforms:
    • type: string
      string:
      type: Format
      format:
      fmt: "the-field-%s"

However, the correct format syntax should eliminate the format key, as shown below:

patches:

  • type: FromCompositeFieldPath
    fromFieldPath: spec.field1
    toFieldPath: metadata.annotations["stringAnnotation"]
    transforms:
    • type: string
      string:
      type: Format
      fmt: "the-field-%s"

@netlify
Copy link

netlify bot commented Aug 21, 2023

Deploy Preview for crossplane ready!

Name Link
🔨 Latest commit 29e13f3
🔍 Latest deploy log https://app.netlify.com/sites/crossplane/deploys/64e5dcdca0a2b4000835703c
😎 Deploy Preview https://deploy-preview-537--crossplane.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@youyongsong youyongsong force-pushed the fix/string-format-example branch 3 times, most recently from 1f4c19d to 52f52bb Compare August 21, 2023 08:32
@phisco
Copy link
Collaborator

phisco commented Aug 23, 2023

@youyongsong could you also fix it in the v1.13 docs here?

Signed-off-by: youyongsong <youyongsong@gmail.com>
@youyongsong
Copy link
Contributor Author

@youyongsong could you also fix it in the v1.13 docs here?

Thanks for the reminder, I also added the fix in the 1.13 docs

@turkenh turkenh merged commit e2bc4ad into crossplane:master Aug 25, 2023
7 checks passed
@youyongsong youyongsong deleted the fix/string-format-example branch August 25, 2023 12:24
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.

3 participants