Skip to content

Added 2025-03-01-preview swagger for Nginx.NginxPlus #34442

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

briantkim93
Copy link
Member

ARM (Control Plane) API Specification Update Pull Request

Tip

Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram

Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

spec_pr_review_workflow_diagram

Purpose of this PR

What's the purpose of this PR? Check the specific option that applies. This is mandatory!

  • New resource provider.
  • New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
  • Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
  • Update existing version to fix OpenAPI spec quality issues in S360.
  • Convert existing OpenAPI spec to TypeSpec spec (do not combine this with implementing changes for a new API version).
  • Other, please clarify:
    • edit this with your clarification

Due diligence checklist

To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

  • I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
  • I have reviewed following Resource Provider guidelines, including
    ARM resource provider contract and
    REST guidelines (estimated time: 4 hours).
    I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.
  • A release plan has been created. If not, please create one as it will help guide you through the REST API and SDK creation process.

Additional information

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.

Getting help

  • First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
  • If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
  • To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
  • For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
    and https://aka.ms/ci-fix.
  • For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
  • If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
    This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
  • If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

Copy link

openapi-pipeline-app bot commented May 5, 2025

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR is in purview of the ARM review (label: ARMReview). This PR must get ARMSignedOff label from an ARM reviewer.
    This PR has ARMChangesRequested label. Please address or respond to feedback from the ARM API reviewer.
    When you are ready to continue the ARM API review, please remove the ARMChangesRequested label.
    Automation should then add WaitForARMFeedback label.
    ❗If you don't have permissions to remove the label, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories.
    For details of the ARM review, see aka.ms/azsdk/pr-arm-review
  • ❌ The required check named Automated merging requirements met has failed. This is the final check that must pass. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide. In addition, refer to step 4 in the PR workflow diagram

Copy link

openapi-pipeline-app bot commented May 5, 2025

PR validation pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.

@github-actions github-actions bot added the brownfield Brownfield services will soon be required to convert to TypeSpec. See https://aka.ms/azsdk/typespec. label May 5, 2025
Copy link

github-actions bot commented May 5, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Language API Review for Package
Swagger NGINX.NGINXPLUS
JavaScript @azure/arm-nginx
java com.azure.resourcemanager:azure-resourcemanager-nginx
go sdk/resourcemanager/nginx/armnginx
Go sdk/resourcemanager/nginx/armnginx

@briantkim93
Copy link
Member Author

/azp run

Copy link

You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@briantkim93 briantkim93 force-pushed the brian/publish_2025_03_01_preview branch from 60464f2 to d724496 Compare May 5, 2025 14:47
@AzureRestAPISpecReview AzureRestAPISpecReview added the ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test label May 12, 2025
@briantkim93 briantkim93 removed the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label May 12, 2025
@openapi-pipeline-app openapi-pipeline-app bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label May 12, 2025
@briantkim93
Copy link
Member Author

You appear to have not followed the guidance provided to create a new API version - https://aka.ms/azsdkdocs/createopenapispec

image

I have started new commits off the previous version as of this commit - c596bf6

Does that work ?

- code: GetCollectionResponseSchema
from: swagger.json
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/wafPolicies"]
reason: This is by design to avoid high bandwidth consumption
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this. How is it going to avoid high bandwidth consumption?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General saving bandwidth is not a good idea not to follow RPC rules, further discussion may be needed.

"type": "integer",
"format": "int32"
},
"Operation-Location": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Operation-Location": {

why Operation-Location? Most Azure APIs use the Azure-AsyncOperation header for this I think.

https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations

"max"
],
"description": "The capacity parameters of the profile.",
"x-ms-client-flatten": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"x-ms-client-flatten": true,

Moving flatten here seems like it will change the shape of the SDK generated object in a breaking way, is this intended as a bugfix??

],
"description": "The geo-location where the resource lives"
},
"systemData": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

systemData

it might be even better to refactor to

"$allOf": "../../../../../common-types/resource-management/v6/types.json#/definitions/TrackedResource",

which should include systemData and most other top level properties

"properties": {
"$ref": "#/definitions/NginxDeploymentApiKeyRequestProperties"
},
"systemData": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

systemData

it might be even better to refactor to

"$allOf": "../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource",

which should include systemData and most other top level properties

"properties": {
"$ref": "#/definitions/NginxDeploymentWafPolicyProperties"
},
"systemData": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest instead inheriting proxy resource as best practice

"properties": {
"$ref": "#/definitions/NginxDeploymentWafPolicyMetadataProperties"
},
"systemData": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

systemData

suggest instead inheriting proxy resource as best practice

"type": {
"type": "string",
"readOnly": true
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are implied if you inherit proxyresource

"time": {
"type": "string",
"readOnly": true,
"description": "The date and time the policy was compiled in UTC."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"description": "The date and time the policy was compiled in UTC."

is it the usual ISO format?
consider explaining in description,
and adding "format": "date-time" if so

"readOnly": true,
"description": "A readable string of the current status, and sometimes have the reason for the current state. If the CompilingStatus is Failed the Display Status will be The waf Policy failed to compile."
},
"time": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time

you could come up with a clearer name than 'time', like 'startedCompilingAt' or 'compiledAt'

"readOnly": true
},
"provisioningState": {
"$ref": "#/definitions/ProvisioningState"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProvisioningState

Do all your different resources really have the same provisioning state enum values? Just checking!!

"items": {
"$ref": "#/definitions/NginxDeploymentDefaultWafPolicyProperties"
},
"x-ms-identifiers": []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't they usually have an identifying property? such as the 'id'?

}
}
},
"NginxDeploymentDefaultWafPolicyProperties": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NginxDeploymentDefaultWafPolicyProperties

you mustn't use different contracts for GET and LIST item responses

This needs to be the same as NginxDeploymentWafPolicy

],
"x-ms-enum": {
"modelAsString": true,
"name": "NginxDeploymentWafPolicyCompilingStatusCode",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NginxDeploymentWafPolicyCompilingStatusCode

Just a thought in case it helps:

Would the users of your API want their deployment, triggered by PUT, or PATCH, to only be considered complete once compilation has successfully finished? If so you should probably find a way to reflect this in provisioning state also, e.g. provisioning state should only be succeeded after successful compilation.

idea; YMMV

@TimLovellSmith
Copy link
Member

You appear to have not followed the guidance provided to create a new API version - https://aka.ms/azsdkdocs/createopenapispec
image

I have started new commits off the previous version as of this commit - c596bf6

Does that work ?

Worked for me, thanks

@TimLovellSmith TimLovellSmith added the ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review label May 16, 2025
@openapi-pipeline-app openapi-pipeline-app bot removed the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved-Suppression ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review ARMReview BreakingChange-Approved-Previously Changes were reviewed and approved in a previous PR BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required brownfield Brownfield services will soon be required to convert to TypeSpec. See https://aka.ms/azsdk/typespec. new-api-version PipelineBotTrigger PublishToCustomers Acknowledgement the changes will be published to Azure customers. ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test resource-manager RPaaS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants