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

Update resourcedocsgen to pull in the latest from pulumi/pulumi #9661

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

cnunciato
Copy link
Contributor

@cnunciato cnunciato commented Aug 10, 2023

Updates the pulumi/pulumi dependencies in resourcedocsgen to pick up the changes in pulumi/pulumi#13703, and adds a few details to the README to better explain how to iterate on changes to API docs templates.

@cnunciato cnunciato force-pushed the cnunciato/registry-2924 branch 4 times, most recently from 995136a to cb9a8d2 Compare August 10, 2023 21:32
bors bot added a commit to pulumi/pulumi that referenced this pull request Aug 11, 2023
13703: Fix inconsistent names of supporting types in docs r=cnunciato a=cnunciato

# Description

This change fixes a naming inconsistency among supporting/nested types among different languages in the resource docs. Currently, when either Python or Go is selected, the links to supporting types in property lists are labeled (correctly) using with `Args` suffixes, but those links point to headings that don't contain those suffixes:

![image](https://github.com/pulumi/pulumi/assets/274700/482ee669-2027-4a79-b1ad-82443adc9bfd)

Additionally, when other languages are selected (JS/TS, C#, Java, YAML), these links contain `Args` suffixes when they shouldn't -- e.g., for TypeScript, for which the `corsRules` property of `aws.s3.Bucket` is listed as a `BucketCorsRuleArgs[]`, but is actually a `BucketCorsRule[]`:  

![image](https://github.com/pulumi/pulumi/assets/274700/be0a41dc-6aa3-4950-9be6-f4c7b8322cd1)

Both of these can lead to confusion.

This change adds some logic to remove `Args` suffixes from property lists in languages other than Python and Go (where they're correct) and, for Python and Go, shows the `-Args` version of the type's display name in the heading as well. A preview of these changes can be seen here (via [this Docs PR](pulumi/docs#9661)):

http://www-pulumi-docs-origin-pr-9661-cb9a8d22.s3-website.us-west-2.amazonaws.com/registry/packages/aws/api-docs/s3/bucket/

![image](https://github.com/pulumi/pulumi/assets/274700/c638d3fd-384f-41d3-961e-3d64d9be5ba1)

Fixes pulumi/registry#2924.
Fixes pulumi/registry#1524.

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


Co-authored-by: Christian Nunciato <[email protected]>
@cnunciato cnunciato force-pushed the cnunciato/registry-2924 branch 3 times, most recently from 1707868 to fa794cc Compare August 11, 2023 19:44
@cnunciato cnunciato marked this pull request as ready for review August 11, 2023 19:45
@cnunciato cnunciato requested review from sean1588 and a team August 11, 2023 19:45
@cnunciato cnunciato changed the title Test a resource docs fix Update resourcedocsgen to pull in the latest from pulumi/pulumi Aug 11, 2023
@cnunciato cnunciato merged commit 6da7d06 into master Aug 11, 2023
@cnunciato cnunciato deleted the cnunciato/registry-2924 branch August 11, 2023 21:00
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.

2 participants