hashicorp / terraform-plugin-codegen-framework

Terraform Provider Code Generation Specification to Framework
Mozilla Public License 2.0
39 stars 16 forks source link

Implement description and markdown description for provider, resource and datasource #136

Closed cysp closed 5 months ago

cysp commented 6 months ago

Hi there, I took a super quick swing at supporting "description" and "markdown_description" in schema generation for providers, resources and data sources.

I couldn't see an existing test asserting this generation output, but I saw one specifically for models and cribbed this test from that. Apart from the tests introduced here, I've run this successfully on a provider I'm writing.

As I say, this was super quick so feel free to dismiss or provide absolutely any level of feedback. 🙂

Partially addresses #112

hashicorp-cla-app[bot] commented 6 months ago

CLA assistant check
All committers have signed the CLA.

cysp commented 5 months ago

BTW this builds upon the dependabot update of https://github.com/hashicorp/terraform-plugin-codegen-spec (https://github.com/hashicorp/terraform-plugin-codegen-framework/pull/130), and in fact targets that branch rather than main so that it picks up the update. Feel free to merge that separately and I'll rebase or whatever as needed.

austinvalle commented 5 months ago

BTW this builds upon the dependabot update of https://github.com/hashicorp/terraform-plugin-codegen-spec (#130), and in fact targets that branch rather than main so that it picks up the update. Feel free to merge that separately and I'll rebase or whatever as needed.

Ah apologies, that dep bump slipped my sight. I merged that PR, not sure why GitHub closed your PR on my behalf lol.

If you want to rebase against main I think we'll be good to merge this.

cysp commented 5 months ago

Ah, I think Github closed it because the target branch (dependabot's pr branch) was deleted. I'd usually expect GitHub to re-target to the main branch, perhaps it didn't because I raised it from a fork? In any case, I'm not able to reopen this so I rebased and raised it anew in https://github.com/hashicorp/terraform-plugin-codegen-framework/pull/139