Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dikhan committed Aug 27, 2018
1 parent 7d763ee commit 2595658
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/how_to.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ x-terraform-immutable | boolean | The field will be used to create a brand new
x-terraform-force-new | boolean | If the value of this property is updated; terraform will delete the previously created resource and create a new one with this value
x-terraform-sensitive | boolean | If this meta attribute is present in an object definition property, it will be considered sensitive as far as terraform is concerned, meaning that its value will not be disclosed in the TF state file
x-terraform-id | boolean | If this meta attribute is present in an object definition property, the value will be used as the resource identifier when performing the read, update and delete API operations. The value will also be stored in the ID field of the local state file.
x-terraform-field-name | string | This enables service providers to override the schema definition property name with a different one which will be the property name used in the terraform configuration file. This is mostly used to expose the internal property to a more user friendly name. If the extension is not present and the property name is not terraform compliant, an automatic convertion will be performed by the OpenAPI Terraform provider to make the name compliant (following Terraform's field name convention to be snake_case)
x-terraform-field-name | string | This enables service providers to override the schema definition property name with a different one which will be the property name used in the terraform configuration file. This is mostly used to expose the internal property to a more user friendly name. If the extension is not present and the property name is not terraform compliant, an automatic conversion will be performed by the OpenAPI Terraform provider to make the name compliant (following Terraform's field name convention to be snake_case)

##### <a name="definitionExample">Full Example</a>

Expand Down Expand Up @@ -446,7 +446,7 @@ definitions:
type: string
x-terraform-sensitive: true

someNonUserFriendlyPropertyName: # If this property did not have the 'x-terraform-field-name' extension, the property name will be automatically converted by the OpenAPI Terraform provider into a name that is Terraform field name compliant. The result will be: some_non_user_friendly_property_name
someNonUserFriendlyPropertyName: # If this property did not have the 'x-terraform-field-name' extension, the property name will be automatically converted by the OpenAPI Terraform provider into a name that is Terraform field name compliant. The result will be: some_non_user_friendly_propertyName
type: string
x-terraform-field-name: property_name_more_user_friendly
```
Expand Down
2 changes: 1 addition & 1 deletion examples/swaggercodegen/api/api/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

func AuthenticateRequest(r *http.Request, w http.ResponseWriter) error {
apiKey := r.Header.Get("Authorization")
if apiKey == "" || apiKey != "apiKeyValue" {
if apiKey != "apiKeyValue" {
msg := fmt.Sprintf("unauthorized user")
sendErrorResponse(http.StatusUnauthorized, msg, w)
return errors.New(msg)
Expand Down

0 comments on commit 2595658

Please sign in to comment.