Commit Graph

15 Commits

Author SHA1 Message Date
Sean Holung 23313d6b0a
Fix deprecation note formatting ()
fixes: https://github.com/pulumi/registry/issues/3983

This PR fixes up some issues with our deprecation message formatting.
The deprecation messages attached to enums were not being formatted at
all, due to a missing css class. Secondly, I also noticed there was a
whitespace missing in the deprecation message when it renders in the
browser, due to the leading `-` in `{{- .... -}}`, so I addressed that
here as well.

### enum deprecation

before:
![Screen Shot 2024-02-22 at 10 20 34
AM](https://github.com/pulumi/pulumi/assets/16751381/89cf20b7-ad05-4085-9a42-fd73f964e250)



after:
![Screen Shot 2024-02-22 at 9 54 43
AM](https://github.com/pulumi/pulumi/assets/16751381/a95a8302-e40f-43aa-96a2-44f14b505571)

### fix whitespace after "Deprecated:"

before:
![Screen Shot 2024-02-22 at 10 20 53
AM](https://github.com/pulumi/pulumi/assets/16751381/53f088fa-5f46-45e4-b217-536b0affa0cf)

after:
![Screen Shot 2024-02-22 at 9 54 29
AM](https://github.com/pulumi/pulumi/assets/16751381/fbc687a7-43aa-4b80-9f3b-cd3d9f3255a0)
2024-03-02 06:02:03 +00:00
Ian Wahbe b281b482dc
Pass through resource replacement in the schema ()
* Pass through resource replacement in the schema

* Add property

* Ignore files in .pytest_cache

* Remove .pytest_cache files

* Add a test + Fix
2022-05-17 13:59:47 -07:00
Christian Nunciato e462b78a74
Fix Node.js properties template () 2022-05-01 10:25:12 -07:00
Christian Nunciato 0a0f48e292
Replace Hugo shortcodes () 2022-04-29 15:04:15 -07:00
Christian Nunciato 3b8a0dd3e3
Remove leading and trailing whitespace in resource properties ()
* Remove leading and trailing whitespace in resource properties

* Make tests pass

* Add PULUMI_ACCEPT support to docs gen tests

* Handle a couple more places

Co-authored-by: Pat Gavlin <pat@pulumi.com>
2021-05-04 17:59:30 -07:00
Christian Nunciato c20bdbe945
Update resource-docs templates to adjust for Hugo upgrade () 2021-03-14 07:24:55 -07:00
Komal 95c09d88c8
[codegen/docs] - Add enums to docs () 2020-12-14 14:40:14 -08:00
Komal fed47e7334
[codegen/docs] - Fix html for property types () 2020-12-11 12:01:50 -08:00
Komal cba68b0874
Fix union types in resource docs () 2020-12-09 18:18:34 -08:00
Sean Holung c538db64c8
Anchoring properties () 2020-05-22 14:53:34 -07:00
Praneet Loke 729ae08c9d
Handle k8s cases in the resource doc generator ()
* Add a check for the Python code gen to prevent infinte recursion. Remove the custom logic for k8s for generating Python property case maps.

* Fix bug with C# links for k8s constructor resources.

* Apply a style on the deprecation message.

* Use the display name when rendering a property type that does not have a link.

* Fix the python type string generator for docs to inspect union types.

* Update cleanTypeString to account for nodejs package names.

* Add missing lookup names for packages.
2020-04-10 14:07:52 -07:00
Christian Nunciato 21ee0919cd Update the resource-docs templates 2020-03-30 14:38:29 -07:00
Tasia Halim bdefc557af make comment htmlSafe 2020-03-25 12:37:03 -07:00
Praneet Loke 861d568eb2
Add test for resource docs to confirm Python casing ()
* Generate Go package maps at the beginning, so that the resource docs can use the appropriate package context for generating a property type string name.
2020-03-20 08:17:58 -07:00
Praneet Loke edbb05dddd
Update schema-based docs generator ()
* Update properties.tmpl to render property comment as-is. WIP splitting out properties to lang-specific tables.

* Generate the constructor dynamically from the resource per language.

* Add doc functions in each language generator package for getting doc links for types..and later other functions too.

* Render the constructor params in the Go code and inject into the template.

* Generate nodejs types using the nodejs lang generator.

* Add a templates bundler. Added a new Make target for autogenerating a static bundle for the resource docs generator.

* Generate type links for all languages based on their schema type. Render the property type with a link if the underlying elements have a supporting type. Fix word-breaks for Python type names.

* Various changes including the introduction of an interface type under the codegen package to help with generating some language-specific information for the resource docs generator.

* Add a function to explicitly generate links for input types of nested types. Fix the resource doc link generator for Go. Don't replace the module name from the nodejs language type.

* Fix bug with C# property type html encoding.

* Fix some template formatting. Pass the state inputs for Python to generate the lookup function for it.
* Do not generate the examples section if there are none.

* Generating the property types per language.

* Formatting. Rename function for readability.

* Add comments. Update README.

* Use relative URLs for doc links within the main site
2020-03-09 10:35:20 -07:00