Resource doc changes for Python:
- Types are included in constructor/function args
- The property names for input/output types are now always snake_case, regardless of the generated mapping tables, to match the new input/output classes
- Some other minor tweaks to function/constructor signatures (e.g. removed the `__props__` arg, as it's not meant to be used directly; use `@staticmethod` for static `get` methods).
* Use the correct format for package name when module name is empty.
* Add an exclusion for Docker's Image component resource when generating the Python formal params.
* Prefix the type name with the package name when linking to Python function names.
The docs generator previously assumed that the opts parameter
for every resource was of the CustomResource type. This is
incorrect for the YAML and Helm overlays, which are
ComponentResources. This should be handled more generally
once our schema supports ComponentResources, but this fixes
the docs for now.
Use the schema package's Markdown parser and walk its AST to extract
examples.
These changes also rename StripNonRelevantExamples to FilterExamples.
This is preparatory work for #4159 and #4632.
In particular, use the parser to filter and extract examples. This also
sets up support for entity references in documentation that can be used
in order to render language-specific names for resources, functions,
types, and properties.
Related to #4632 and #4159.
* Remove code that was hiding Go as a language option for k8s overlay resources. Mark input args type for Functions as optional in Go.
* Show a special note in the Go function's snippet when the function name does not match other languages.
* Make sure the draft PR stays assigned to the original author. Add some more comments.
* Remove logic to use the Go ModuleToPackage map to then lookup the relevant C# namespace. Make getLanguageModuleName a method of modContext since passing in a package is not needed anymore.
* Generate language package details in the index pages.
* Add a new DocLanguageHelper interface method to get to a module per-language.
* Add a new workflow file for automatically creating draft docs PRs for previewing resource docs for AWS and Kubernetes as a result of changes in the resource docs generator.
* Add a new template for examples section. Extract the examples section into a structured format for custom template processing.
* Update the description IFF we were able to extract examples sections from it.
* Update doc comments and add missing file header for the newly added file.
* Make the example description readable. Add a check for empty example sections.
* Add a chooser right below the Example Usage header. Remove javascript as a language.
* Allow an empty new-line between short-codes boundaries.
* Adjust the args type names for k8s overlay resources.
* Revert to using input type link for kubernetes non-overlay resources.
* Use the correct module name to lookup the C# namespace for resources that belong to a module.
* Helm's arg types don't use the version number.
* Restore the API type links for C#.
* Also restore them in function.tmpl.
* Add package details to the Functions template as well. Add a global template function to detect if the APIDocLinks has links for a language. Don't generate C# API doc links for k8s.
* Add a new DocLangHelper interface method to generate function names per language. Use the functionNames override map in Go to correctly generate a function name.
* Add kong to the title lookup map.
* Check if item was found in map.
* Use title case for the nodejs Function args type name. Use title case for the function name in the index page.
* Also fix the result name for a Function in nodejs to use title case.
* Use the module name to lookup the package.
* Use the title-case name for the Function name in the index page. Fix the language value passed to the lang chooser in function.tmpl.
* Use title case for nested type titles.
* Add title lookup for GitHub.
* Optimize titles and descriptions
* Move regexp to file level variable
* wip
* Add title tags and description to module and pkg index pages
* Remove block_external_search_index from index.tmpl
* Improve resource descriptions
* Add more providers to look up map
* Improve module level descriptions
Clean up
cleanup
* Update the function.tmpl with the auto-generated disclaimer. Pass title tag and meta description for the function template as well.
* Fix whitespace in the package_details template..
* Account for empty module names for package-level resources. Move logic for generating title tag and description into separate methods for Resources and Functions.
* Add a test for the generated resource and function title tag.
Co-authored-by: Praneet Loke <1466314+praneetloke@users.noreply.github.com>
* Add ids to headers so they can be linked to
* Make header ids more general
Rather than including the identifier in the name of the id, use a simpler more generic id.
* H3=>H2 for Modules/Resources/Functions/Package Details headings
This way, on individual resource/function pages, it doesn't make it look like "Package Details" is a sub heading under "Supporting Types" in the right-hand "ON THIS PAGE".
* Add auto-generated disclaimer for the resource.tmpl as well.
* Allow specifying the languages to show in the lang chooser. Hide the go language for k8s overlay resources.
* Add another exclusion for generating the C# constructor param for k8s overlay resources.
* Replace hard-coded exclusions for skipping input properties with checking for ConstValue attribute of input properties.
* Add a method to the DocLanguageHelper interface to get the API doc link for Pulumi types.
* Add a test for Go API doc link methods.
* Use GetDocLinkForPulumiType in gen_function as well.
* Make `async:true` the default for `invoke` calls (#3750)
* Switch away from native grpc impl. (#3728)
* Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752)
* Only retry as long as we get unavailable back. Anything else continues. (#3769)
* Handle all errors for now. (#3781)
* Do not assume --yes was present when using pulumi in non-interactive mode (#3793)
* Upgrade all paths for sdk and pkg to v2
* Backport C# invoke classes and other recent gen changes (#4288)
Adjust C# generation
* Replace IDeployment with a sealed class (#4318)
Replace IDeployment with a sealed class
* .NET: default to args subtype rather than Args.Empty (#4320)
* Adding system namespace for Dotnet code gen
This is required for using Obsolute attributes for deprecations
```
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
```
* Fix the nullability of config type properties in C# codegen (#4379)
* Fix k8s input type links for constructor args.
* Skip using property case maps for k8s Python.
* Fix the namespace of C# constructor args type and resource type.
* Use the correct module names for languages.
* Add Kubernetes to the title lookup map.
* Add output properties to the map only if filtered output properties is non-zero length.
* 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.
* Add new templates for generating index files. Remove the now irrelevant code.
* Add comment for generating index files by deduping module names. Use the path format of a module name as the link.
* Add a trailing slash for module links in the index page.
* Move the categories rendered in the index file into their own template file. Handle kubernetes provider specific module name conversion while generating parent modules.
* Fix issue with the k8s provider resource being generated as a module rather than a resource on the package-level index page.
* Show the deprecation message of a resource at the top of the document.
* Move k8s specific things to its own file.
* Add title attribute to the list items. Show the last part of a module name, in case it contains path separators
* Lookup the package name from the Go language info object for k8s then use that to lookup the C# namespace.
* Move the logic for cleaning a property type string for display names to a separate function.
* Export the title function from go and dotnet code generators for use in the resource doc generator. Use the title function from the respective lang code gens to match the correct title case used there. Fix issue with the Kubernetes namespace not being stripped for C# property type strings.
* Skip including apiVersion and kind as input properties for Kubernetes until pulumi-kubernetes#1062 is merged.
* Fix an issue with stripping the module name from type doc links in nodejs.
* Remove unused code that visited object types. Update the nested types code to account for types that may reference themselves. Added glog logging statements. Save the package-level language info objects, so we can use them later.
* Check if a type token has already been added as an input or an output type when collecting nested types.
* Rename appearsIn to typeUsage.
* Scan provider resource also using the special-case function if package is k8s.
* Simplify the display names for Pulumi types by removing the Pulumi prefix.