Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maastha committed Oct 11, 2024
1 parent c8e5e06 commit efdb287
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tools/codegen/codespec/api_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,6 @@ func getSchemaFromMediaType(mediaTypes *orderedmap.Map[string, *high.MediaType])
return nil, errSchemaNotFound
}

// hard-coding a default API version for now, if "application/vnd.atlas.2023-01-01+json" version is not found
// then sortedMediaTypes below will read the available media type
jsonMediaType, ok := mediaTypes.Get("application/vnd.atlas.2023-01-01+json")
if ok && jsonMediaType.Schema != nil {
s, err := BuildSchema(jsonMediaType.Schema)
if err != nil {
return nil, err
}
return s, nil
}

sortedMediaTypes := orderedmap.SortAlpha(mediaTypes)
for pair := range orderedmap.Iterate(context.Background(), sortedMediaTypes) {
mediaType := pair.Value()
Expand Down

0 comments on commit efdb287

Please sign in to comment.