pulumi/pkg/codegen/docs/test_data
Guinevere Saenger 26bdac7438
Add ability to process docs without dedicated Examples logic (#15475)
This pull request depends on corresponding changes in the
pulumi-terraform bridge.

The bridge will mark up each code section it finds (not just ones found
under an "Example Usage" header) with an HTML comment - currently this
will be `<!--Begin Code Chooser -->` and `<!--End Code Chooser -->` but
the name is subject to change.

In this PR, we are adding logic to detect if an incoming Description
block has an `{{% examples }}` shortcode markup: if yes, we will process
it as before. If no, we will switch to new functionality that relies on
documentation with code sections having no short codes, no "Examples
Section" logic, and will generate every code section it finds in an
incoming schema that is in the Description/Content section of a registry
page with a chooser and language choosables.

This work is part of https://github.com/pulumi/pulumi-aws/issues/2624.


Edit: unit tests are added

This PR is a prerequisite for
https://github.com/pulumi/pulumi-terraform-bridge/pull/1689. It aims to
support both legacy and new behavior.



<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

Fixes # (issue)

## 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. -->
- [x] 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. -->
2024-02-23 18:06:44 +00:00
..
certificate-validation-description-in.md Add ability to process docs without dedicated Examples logic (#15475) 2024-02-23 18:06:44 +00:00
certificate-validation-description-out.md Add ability to process docs without dedicated Examples logic (#15475) 2024-02-23 18:06:44 +00:00
lambda-description-in.md Add ability to process docs without dedicated Examples logic (#15475) 2024-02-23 18:06:44 +00:00
lambda-description-out.md Add ability to process docs without dedicated Examples logic (#15475) 2024-02-23 18:06:44 +00:00