pulumi/pkg/codegen/schema
Zaid Ajaj 7e9aab2597
[schema] Emit a warning when using id or urn as resource properties (#15060)
# Description

Emits a warning when binding properties of resources if we encounter a
property with name `urn` or when we encounter a property with name `id`
(only for resources which are not components / MLCs). This is a follow
up PR for #15025

## Checklist

- [ ] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [ ] 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.
-->
- [x] 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-01-18 00:35:51 +00:00
..
bind.go [schema] Emit a warning when using id or urn as resource properties (#15060) 2024-01-18 00:35:51 +00:00
docs_parser.go golangci-lint: Enable staticcheck 2023-01-14 16:59:46 -08:00
docs_renderer.go all: Assert => Assertf 2023-03-03 14:37:43 -08:00
docs_test.go Actually disable plugin acquisition (#14134) 2023-10-14 08:32:43 +00:00
loader.go Add an envar to disable automatic provider installation (#14083) 2023-10-03 15:35:23 +00:00
loader_client.go Add matrix testing (#13705) 2023-09-13 15:17:46 +00:00
loader_schema_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
loader_server.go Add schema loader service 2023-07-27 15:03:52 +01:00
loader_test.go all: Don't use cmdutil.Diag in tests 2023-03-13 12:54:04 -07:00
mock_pulumi_schema.go all: Assert => Assertf 2023-03-03 14:37:43 -08:00
package_reference.go Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
pulumi.json Don't set additionalProperties 2023-03-27 10:11:57 +01:00
schema.go [schema] Fix package get-schema marking resource properties as plain (#14689) 2023-12-01 19:41:51 +00:00
schema_test.go [schema] Emit a warning when using id or urn as resource properties (#15060) 2024-01-18 00:35:51 +00:00