Skip to content

Commit

Permalink
Merge pull request hashicorp#3653 from hashicorp/revert-3641-f/lro-re…
Browse files Browse the repository at this point in the history
…ponse-models

Revert "`importer-rest-api-specs` - remove workaround to remove LRO models "
  • Loading branch information
tombuildsstuff authored Jan 18, 2024
2 parents 4d4acfc + 694cf14 commit a59aa19
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/importer-rest-api-specs/components/parser/load_and_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ func LoadAndParseFiles(directory string, fileNames []string, serviceName, apiVer
return nil, fmt.Errorf("applying Swagger overrides: %+v", err)
}

// the response object is removed for long-running operations (see #2828) as well as for operations that are not
// list operations for parity with the former data api definitions in C# (see #3364).
// this can only be done here, since there are data workarounds that manipulate the operation information that
// we need to determine if the response object should be stripped or not e.g. workaround_automation_25435.go
for _, service := range *output {
for _, resource := range service.Resources {
operations := removeResponseObjectForSpecificOperations(&resource.Operations)
resource.Operations = *operations
}
}

out = *output

if len(out) > 1 {
Expand Down

0 comments on commit a59aa19

Please sign in to comment.