diff --git a/tools/importer-rest-api-specs/parser/helpers.go b/tools/importer-rest-api-specs/parser/helpers.go index fb6cacabd4e..9439fabc21e 100644 --- a/tools/importer-rest-api-specs/parser/helpers.go +++ b/tools/importer-rest-api-specs/parser/helpers.go @@ -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 diff --git a/tools/importer-rest-api-specs/parser/load_and_parse.go b/tools/importer-rest-api-specs/parser/load_and_parse.go index 9ccc4d86682..5ef593f1012 100644 --- a/tools/importer-rest-api-specs/parser/load_and_parse.go +++ b/tools/importer-rest-api-specs/parser/load_and_parse.go @@ -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) {