Skip to content

Commit

Permalink
make a field optional, to at least have one non-required field
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRooney committed Jul 12, 2023
1 parent 2714a95 commit 79c686e
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 23 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "hashicups-speakeasy Provider"
page_title: "hashicups Provider"
subcategory: ""
description: |-
Hashicups: Example Hashicups through Speakeasy
---

# hashicups-speakeasy Provider
# hashicups Provider

Hashicups: Example Hashicups through Speakeasy

Expand Down
16 changes: 9 additions & 7 deletions docs/resources/hashicups_order.md → docs/resources/order.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "hashicups_order Resource - terraform-provider-hashicups-speakeasy"
page_title: "hashicups_order Resource - terraform-provider-hashicups"
subcategory: ""
description: |-
Order Resource
Expand All @@ -14,11 +14,10 @@ Order Resource

```terraform
resource "hashicups_order" "my_order" {
description = "...my_description..."
image = "...my_image..."
name = "Terrence Rau"
price = 85.8
teaser = "...my_teaser..."
image = "...my_image..."
name = "Terrence Rau"
price = 85.8
teaser = "...my_teaser..."
}
```

Expand All @@ -27,12 +26,15 @@ resource "hashicups_order" "my_order" {

### Required

- `description` (String) Product description of the coffee.
- `image` (String) URI for an image of the coffee.
- `name` (String) Product name of the coffee.
- `price` (Number) Suggested cost of the coffee.
- `teaser` (String) Fun tagline for the coffee.

### Optional

- `description` (String) Product description of the coffee.

### Read-Only

- `id` (Number) Order ID
Expand Down
9 changes: 4 additions & 5 deletions examples/resources/hashicups_order/resource.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
resource "hashicups_order" "my_order" {
description = "...my_description..."
image = "...my_image..."
name = "Terrence Rau"
price = 85.8
teaser = "...my_teaser..."
image = "...my_image..."
name = "Terrence Rau"
price = 85.8
teaser = "...my_teaser..."
}
4 changes: 1 addition & 3 deletions hashicups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ info:
servers:
- url: https://example.com
security:
- APIKey: [ ]
- APIKey: []
externalDocs:
url: https://docs.speakeasyapi.dev
description: The Speakeasy Platform Documentation
Expand Down Expand Up @@ -98,7 +98,6 @@ components:
required:
- name
- teaser
- description
- price
- image
type: object
Expand Down Expand Up @@ -128,7 +127,6 @@ components:
- id
- name
- teaser
- description
- price
- image
type: object
Expand Down
3 changes: 2 additions & 1 deletion internal/provider/order_resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions internal/provider/order_resource_sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/sdk/pkg/models/shared/createorderinput.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/sdk/pkg/models/shared/order.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/sdk/sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 79c686e

Please sign in to comment.