Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification Hubs RP: adding API version 2023-01-01-preview #23740

Closed

Conversation

kmiecikt
Copy link
Contributor

This PR adds a new preview API version for Notification Hubs RP - 2023-01-01-preview. This version includes:

  1. New features, including:
    • Private Link & network-level access control
    • Supporting new PNS (Push Notification Service) types: Browser, Xiaomi
    • Availability Zones
    • Namespace-level PNS credentials
  2. Fixes for many of the required ARM Open API / RPC compliance requirements, including:
    • Correctly modeling some of the properties as enums (instead of strings)
    • Adding x-ms-secret annotation
    • Annotating the read-only and immutable properties
    • Annotating pageable operations
    • Marking some of the properties as deprecated (they are still supported though)
    • Fixes some of the response / request types that were incorrect in the previous swagger version (i.e. did not match the content that the RP actually expected / produced).

The Pull Request all contains updated examples. All of the requests were invoked & verified.

@openapi-workflow-bot
Copy link

Hi, @kmiecikt Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 26, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️❌Breaking Change(Cross-Version): 207 Errors, 35 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    notificationhubs.json 2023-01-01-preview(0ed4bbb) 2017-04-01(main)

    The following breaking changes are detected by comparison with the latest stable version:

    Only 30 items are listed, please refer to log for more details.

    Rule Message
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1003 - RequestBodyFormatNoLongerSupported The new version does not support 'application/json' as a request body format.
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L12:3
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}' removed or restructured?
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L316:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules' removed or restructured?
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L547:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys' removed or restructured?
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L594:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' removed or restructured?
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L645:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}' removed or restructured?
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1037:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules' removed or restructured?
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1263:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/listKeys' removed or restructured?
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1317:5
    1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys' removed or restructured?
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1375:5
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'NamespaceCreateOrUpdateParameters' removed or renamed?
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L1870:3
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1494:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'SharedAccessAuthorizationRuleCreateOrUpdateParameters' removed or renamed?
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L1870:3
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1494:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'PolicykeyResource' removed or renamed?
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L1870:3
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1494:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'NotificationHubCreateOrUpdateParameters' removed or renamed?
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L1870:3
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1494:3
    1006 - RemovedDefinition The new version is missing a definition that was found in the old version. Was 'DebugSendParameters' removed or renamed?
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L1870:3
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L1494:3
    1008 - ModifiedOperationId The operation id has been changed from 'Namespaces_Patch' to 'Namespaces_Update'. This will impact generated code.
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L934:7
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L173:7
    1008 - ModifiedOperationId The operation id has been changed from 'NotificationHubs_Patch' to 'NotificationHubs_Update'. This will impact generated code.
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L181:7
    Old: Microsoft.NotificationHubs/stable/2017-04-01/notificationhubs.json#L823:7
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L815:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L860:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L921:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L976:11
    1011 - AddingResponseCode The new version adds a response code 'default'.
    New: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L1019:11
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️❌LintDiff: 1 Errors, 4 Warnings failed [Detail]
    compared tags (via openapi-validator v2.1.1) new version base version
    package-2023-01-01-preview package-2023-01-01-preview(0ed4bbb) default(main)

    [must fix]The following errors/warnings are introduced by current PR:

    Rule Message Related RPC [For API reviewers]
    RepeatedPathInfo The 'subscriptionId' already appears in the path, please don't repeat it in the request body.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L886
    RPC-Put-V1-05
    ⚠️ PutInOperationName 'PUT' operation 'PrivateEndpointConnections_Update' should use method name 'Create'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L1557
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2430
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2599
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2845


    The following errors/warnings exist before current PR submission:

    Rule Message
    OperationIdNounVerb Per the Noun_Verb convention for Operation Ids, the noun 'NotificationHubs' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L19
    SyncPostReturn A synchronous POST operation must have either 200 or 204 return codes.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L350
    PostOperationAsyncResponseValidation Only 202 is the supported response code for POST async response.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L377
    OperationsApiSchemaUsesCommonTypes Operations API path must follow the schema provided in the common types.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L1529
    ArmResourcePropertiesBag Top level property names should not be repeated inside the properties bag for ARM resource 'NamespaceResource'. Properties [properties.name] conflict with ARM top level properties. Please rename these.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2643
    ArmResourcePropertiesBag Top level property names should not be repeated inside the properties bag for ARM resource 'NotificationHubResource'. Properties [properties.name] conflict with ARM top level properties. Please rename these.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2810
    TrackedResourcePatchOperation Tracked resource 'SharedAccessAuthorizationRuleResource' must have patch operation that at least supports the update of tags.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L3407
    ⚠️ PostOperationIdContainsUrlVerb OperationId should contain the verb: 'checknamespaceavailability' in:'Namespaces_CheckAvailability'. Consider updating the operationId
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L784
    ⚠️ LocationMustHaveXmsMutability Property location must have 'x-ms-mutability':['read', 'create'] extension defined.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2111
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2122
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2140
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2556
    ⚠️ EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
    Location: Microsoft.NotificationHubs/preview/2023-01-01-preview/notificationhubs.json#L2561
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️❌ApiReadinessCheck: 1 Errors, 0 Warnings failed [Detail]
    Rule Message
    API Readiness check failed. Please make sure your service is deployed. "code: InvalidResourceType,
    message: The resource type 'operations' could not be found in the namespace 'Microsoft.NotificationHubs' for api version '2023-01-01-preview'. The supported api-versions are '2014-09-01,
    2016-03-01,
    2017-04-01,
    2020-01-01-preview'."
    ️⚠️~[Staging] ServiceAPIReadinessTest: 0 Warnings warning [Detail]

    API Test is not triggered due to precheck failure. Check pipeline log for details.

    ️️✔️SwaggerAPIView succeeded [Detail] [Expand]
    ️️✔️CadlAPIView succeeded [Detail] [Expand]
    ️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️PoliCheck succeeded [Detail] [Expand]
    Validation passed for PoliCheck.
    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    ️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
    Validation passes for Lint(RPaaS).
    ️️✔️CadlValidation succeeded [Detail] [Expand]
    Validation passes for CadlValidation.
    ️️✔️TypeSpec Validation succeeded [Detail] [Expand]
    Validation passes for TypeSpec Validation.
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 26, 2023

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking



    ️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from c8f80f0408172708436fd8541583e3777efd4218. SDK Automation 14.0.0
      command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
      command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
    • ️✔️Azure.ResourceManager.NotificationHubs [View full logs]  [Preview SDK Changes]
      info	[Changelog]
    ️⚠️ azure-sdk-for-python-track2 warning [Detail]
    • ⚠️Warning [Logs] Generate from c8f80f0408172708436fd8541583e3777efd4218. SDK Automation 14.0.0
      command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
      cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh] npm notice
      cmderr	[automation_generate.sh] npm notice New minor version of npm available! 9.5.1 -> 9.6.6
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.6>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
      cmderr	[automation_generate.sh] npm notice
    • ️✔️track2_azure-mgmt-notificationhubs [View full logs]  [Preview SDK Changes]
      info	[Changelog]
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs] Generate from c8f80f0408172708436fd8541583e3777efd4218. SDK Automation 14.0.0
      command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
      cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.1.2
      cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
      cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.1.2
      cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
      command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
    • ️✔️azure-resourcemanager-notificationhubs [View full logs]  [Preview SDK Changes]
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from c8f80f0408172708436fd8541583e3777efd4218. SDK Automation 14.0.0
      command	sh ./eng/scripts/automation_init.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
      command	generator automation-v2 ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    • ️✔️sdk/resourcemanager/notificationhubs/armnotificationhubs [View full logs]  [Preview SDK Changes]
      info	[Changelog] ### Other Changes
      info	[Changelog]
      info	[Changelog] Total 0 breaking change(s), 0 additive change(s).
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from c8f80f0408172708436fd8541583e3777efd4218. SDK Automation 14.0.0
      command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
      warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
      command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
      cmderr	[automation_generate.sh] [ERROR] Cannot generate changelog because the codes of local and npm may be the same.
    • ️✔️@azure/arm-notificationhubs [View full logs]  [Preview SDK Changes]
      info	[Changelog]
      error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
    ️⚠️ azure-resource-manager-schemas warning [Detail]
    • ⚠️Warning [Logs] Generate from c8f80f0408172708436fd8541583e3777efd4218. Schema Automation 14.0.0
      command	.sdkauto/initScript.sh ../azure-resource-manager-schemas_tmp/initInput.json ../azure-resource-manager-schemas_tmp/initOutput.json
      cmderr	[initScript.sh]  WARN old lockfile
      cmderr	[initScript.sh] npm WARN old lockfile The package-lock.json file was created with an old version of npm,
      cmderr	[initScript.sh] npm WARN old lockfile so supplemental metadata must be fetched from the registry.
      cmderr	[initScript.sh] npm WARN old lockfile
      cmderr	[initScript.sh] npm WARN old lockfile This is a one-time fix-up, please be patient...
      cmderr	[initScript.sh] npm WARN old lockfile
      warn	File azure-resource-manager-schemas_tmp/initOutput.json not found to read
      command	.sdkauto/generateScript.sh ../azure-resource-manager-schemas_tmp/generateInput.json ../azure-resource-manager-schemas_tmp/generateOutput.json
    • ️✔️notificationhubs [View full logs]  [Preview Schema Changes]
    ️❌ azure-powershell failed [Detail]
    • Pipeline Framework Failed [Logs] Generate from c8f80f0408172708436fd8541583e3777efd4218. SDK Automation 14.0.0
      command	sh ./tools/SwaggerCI/init.sh ../azure-powershell_tmp/initInput.json ../azure-powershell_tmp/initOutput.json
      command	pwsh ./tools/SwaggerCI/psci.ps1 ../azure-powershell_tmp/generateInput.json ../azure-powershell_tmp/generateOutput.json
      SSL error: syscall failure: Broken pipe
      Error: SSL error: syscall failure: Broken pipe
    • ️✔️Az.notificationhubs.DefaultTag [View full logs
      error	Fatal error: SSL error: syscall failure: Broken pipe
      error	The following packages are still pending:
      error		Az.notificationhubs.DefaultTag
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 26, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Swagger Microsoft.NotificationHubs https://apiview.dev/Assemblies/Review/b9948e5f0152434c8e664f522b8627eb
    Go sdk/resourcemanager/notificationhubs/armnotificationhubs There is no API change compared with the previous version
    Java azure-resourcemanager-notificationhubs https://apiview.dev/Assemblies/Review/91682402d6ac4a46b137ab0e7dca1094
    .Net Azure.ResourceManager.NotificationHubs There is no API change compared with the previous version
    JavaScript @azure/arm-notificationhubs https://apiview.dev/Assemblies/Review/cee2b31b68c24422a233963b36b90e57

    @openapi-workflow-bot
    Copy link

    Hi @kmiecikt, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.
    Note: To avoid breaking change, you can refer to Shift Left Solution for detecting breaking change in early phase at your service code repository.

    @openapi-workflow-bot
    Copy link

    Hi, @kmiecikt, For review efficiency consideration, when creating a new api version, it is required to place API specs of the base version in the first commit, and push new version updates into successive commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki. Or you could onboard API spec pipeline

    @openapi-workflow-bot
    Copy link

    Hi @kmiecikt, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff. If you have any questions, please post your questions in this channel https://aka.ms/swaggersupport.

    TaskHow to fixPriority
    AvocadoFix-AvocadoHigh
    Semantic validationFix-SemanticValidation-ErrorHigh
    Model validationFix-ModelValidation-ErrorHigh
    LintDiffFix-LintDiffhigh
    If you need further help, please feedback via swagger feedback.

    @AzureRestAPISpecReview AzureRestAPISpecReview added WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required and removed BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required labels Apr 27, 2023
    @kmiecikt
    Copy link
    Contributor Author

    This is almost ready for review - we are making the last set of cleanups.

    The "Swagger Breaking Change" check reports only single error in the last build, but earlier today it used to fail with the errors listed below.

    The biggest challenge is the time since the last Swagger was published - over 6 years. Most of the new Open API / RP / ... requirements were added during that time. We tried to be as close as possible to the previous APIs, but almost all of the changes marked as "breaking" were required to fix the compliance issues. Also, please note that they only (or almost) affect the Swagger definition - the actual JSON content of requests / responses should be fully compatible with the older version.

    Rationale for reported breaking changes

    Rule 1034: Added Required Property

    Namespace Location and SKU were always required, but not annotated correctly in Swagger.
    Others should be fixed now.

    Rule 1048: AddedXmsEnum

    The following three properties were modelled as string in Swagger, while they should be enums:

    • NamespaceProperties.ProvisioningState
    • NamespaceProperties.Status
    • PolicyKeyResource.PolicyKey

    The implementation already accepted only values that are now defined in enum, and rejected the rest.

    Rule 1011: Adding Response Code

    The new swagger adds "default" response code with common ErrorResponse schema.

    Rule 1042: ChangedParameterOrder

    The old Swagger version was inconsistent: the query, header and body parameters were mixed together.
    The new Swagger defines common parameters in the same, predicable order for all operations:

    • Path (subscriptionId, resourceGroup, namespaceName, ...)
    • Query (apiVersion)
    • Body

    Rule 1036: ConstraintChanged

    The old Swagger did not define minLength, maxLength and pattern constraints, although they were enforced in our service implementation.

    Rule 1029: ReadonlyPropertyChanged

    All the properties were already read-only in the old implementation, but were not correctly annotated in the previous Swagger file.

    Rule 1023: TypeFormatChanged

    • The old Swagger version used its own subscriptionId parameter, which uuid as a format. The new version uses the shared parameter from common types, which is defined without this format.
    • One of the properties used to be defined as int32, now is defined as integer.

    Rule 1033: RemovedProperty

    • ErrorResponse The old Swagger used custom ErrorResponse object, which was incorrect - the actual service implementation responded with the actual shared schema.
      The new Swagger file references the common type instead of defining its own.
    • sku: this was incorrect definition in the previous Swagger. All response types used to derive from the common Resource schema, which defined sku property. It was never accepted in requests nor returned in responses for types other than NamespaceResource

    Rule 1006: RemovedDefinition

    • NamespaceCreateOrUpdateParameters: this type represented a subset of not-readonly properties from the NamespaceResource.
      To be compliant with OAPI021 (PUT/PATCH shouldn't fail for readonly properties) and OAPI030 (Ignore unchanged immutable properties), the new Swagger accepts the full NamespaceResource object in requests. It is a superset of previous definition.
    • NotificationHubCreateOrupdateParameters: same as above.
    • SharedAccessAuthorizationRuleCreateOrUpdateParameters: same as above.
    • PolicykeyResource: the name of the previous type was incorrect. It was renamed to PolicyKeyResource in the new Swagger.
    • DebugSendParameters: to verify - the previous declaration was likely incorrect.

    Rule 1003: RequestBodyFormatNoLongerSupported

    The previous Swagger defined global consumes and produces section, which was inherited by all operations. As a result, even GET operations were defined as accepting application/json.
    The new Swagger correctly defines the consumes and produces on operation level, and only for correct HTTP methods.

    Rule 1005: RemovedPath

    The paths still exist, but now we use correct camelCase names:

    Old: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}
    New: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}
    

    Rule 1025: RequiredStatusChange

    The properties were already required, but didn't have correct annotation in the Swagger. All requests without those properties failed.

    Rule 1026: TypeChanged

    • Two properties on the response type represent counts, but were defined as number (double) in the old Swagger. There is no change in the actual output - we only define the response type as more restrictive, but user code that expects any number will still be able to parse it.
    • One of the properties was defined as a dynamic object, while our actual responses always returned arrays.

    Rule 1047: XmsEnumChanged

    • NamespaceType.modelAsString used to be defined as false, but it was incorrect - the actual response used strings.
    • AccessRights - the same. We already used strings in both requests and responses, the annotation was incorrect.

    Rule 1044: XmsLongRunningOperationChanged

    • Deleting namespace used to be a long-running operation. Now it a synchronous one that responds with 204.

    @AzureRestAPISpecReview AzureRestAPISpecReview added the BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required label May 11, 2023
    @kmiecikt kmiecikt marked this pull request as draft May 11, 2023 18:37
    @kmiecikt kmiecikt marked this pull request as ready for review May 12, 2023 11:31
    @pilor pilor removed the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label May 12, 2023
    @openapi-workflow-bot openapi-workflow-bot bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label May 12, 2023
    @raosuhas
    Copy link

    @kmiecikt Please do not overwrite the standard comments on the pull request description with your own text , you need to carefully respond to the questions and update all the checkboxes in it otherwise automation will not work correctly.

    ALso For this PR have you added the previous version as a base commit as per the instructions ?

    @raosuhas raosuhas added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label May 15, 2023
    @openapi-workflow-bot openapi-workflow-bot bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label May 15, 2023
    @kmiecikt
    Copy link
    Contributor Author

    Sorry, I did not follow the official guidelines and did not include the base version in the first commit - I discovered them after opening the PR.

    I used the Open API Hub to create a new PR: #24072. I'm closing this one.

    @kmiecikt kmiecikt closed this May 19, 2023
    @JeffreyRichter JeffreyRichter added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label May 22, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review ARMReview BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required CI-FixRequiredOnFailure CI-MissingBaseCommit new-api-version Notification Hub resource-manager
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    7 participants