Skip to content

Commit

Permalink
Remove sample from OperationRepresentation schema
Browse files Browse the repository at this point in the history
This is replaced by `examples` - code for this to be done
  • Loading branch information
oWretch committed Nov 24, 2021
1 parent 8da0654 commit 27bf6bd
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions internal/services/apimanagement/schemaz/api_management.go
Expand Up @@ -91,11 +91,6 @@ func SchemaApiManagementOperationRepresentation() *pluginsdk.Schema {

"form_parameter": SchemaApiManagementOperationParameterContract(),

"sample": {
Type: pluginsdk.TypeString,
Optional: true,
},

"schema_id": {
Type: pluginsdk.TypeString,
Optional: true,
Expand Down Expand Up @@ -123,13 +118,11 @@ func ExpandApiManagementOperationRepresentation(d *pluginsdk.ResourceData, schem
contentType := vs["content_type"].(string)
formParametersRaw := vs["form_parameter"].([]interface{})
formParameters := ExpandApiManagementOperationParameterContract(d, fmt.Sprintf("%s.%d.form_parameter", schemaPath, i), formParametersRaw)
sample := vs["sample"].(string)
schemaId := vs["schema_id"].(string)
typeName := vs["type_name"].(string)

output := apimanagement.RepresentationContract{
ContentType: utils.String(contentType),
Sample: utils.String(sample),
}

contentTypeIsFormData := strings.EqualFold(contentType, "multipart/form-data") || strings.EqualFold(contentType, "application/x-www-form-urlencoded")
Expand Down Expand Up @@ -175,10 +168,6 @@ func FlattenApiManagementOperationRepresentation(input *[]apimanagement.Represen

output["form_parameter"] = FlattenApiManagementOperationParameterContract(v.FormParameters)

if v.Sample != nil {
output["sample"] = *v.Sample
}

if v.SchemaID != nil {
output["schema_id"] = *v.SchemaID
}
Expand Down

0 comments on commit 27bf6bd

Please sign in to comment.