Skip to content

Commit

Permalink
tools/importer-rest-api-specs: ignoring operations explicitly and Iot…
Browse files Browse the repository at this point in the history
…Spaces is EOL
  • Loading branch information
tombuildsstuff committed Oct 11, 2021
1 parent ce35069 commit 7677541
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions tools/importer-rest-api-specs/parser/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ func operationMatchesTag(operation *spec.Operation, tag *string) bool {

func operationShouldBeIgnored(operationUri string) bool {
// we're not concerned with exposing the "operations" API's at this time - e.g.
// /providers/Microsoft.EnterpriseKnowledgeGraph/services
// /providers/Microsoft.CognitiveServices/operations
if strings.HasPrefix(strings.ToLower(operationUri), "/providers/") {
return true
split := strings.Split(strings.TrimPrefix(operationUri, "/"), "/")
if len(split) == 3 && strings.EqualFold(split[2], "operations") {
return true
}
}

// LRO's shouldn't be directly exposed
Expand Down
7 changes: 4 additions & 3 deletions tools/importer-rest-api-specs/parser/load_and_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ func writeToFile(metadata map[string]resourceUriMetadata) {

func serviceShouldBeIgnored(name string) bool {
servicesToIgnore := []string{
"Blockchain",
"DevSpaces",
"ServiceFabricMesh",
"Blockchain", // https://github.com/Azure-Samples/blockchain/blob/1b712d6d05cca8da17bdd1894de8c3d25905685d/abs/migration-guide.md
"DevSpaces", // https://azure.microsoft.com/en-us/updates/azure-dev-spaces-is-retiring-on-31-october-2023/
"IoTSpaces", // https://github.com/Azure/azure-rest-api-specs/pull/13993
"ServiceFabricMesh", // https://azure.microsoft.com/en-us/updates/azure-service-fabric-mesh-preview-retirement/
}
for _, v := range servicesToIgnore {
if strings.EqualFold(name, v) {
Expand Down

0 comments on commit 7677541

Please sign in to comment.