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

Adding BYOL changes #24064

Merged

Conversation

JatinKhatri03
Copy link
Contributor

@JatinKhatri03 JatinKhatri03 commented May 19, 2023

Data Plane API - Pull Request

  1. Added eTag field in Attachments_CreateOrUpdate request and response
  2. Removed "/scenes/stac-collections/{collectionId}/features/{featureId}" Api
  3. Removed custom headers from "/weather-data/:fetch" Api
  4. Changing few variables from string to double
  5. Updating few descriptions
  6. BYOL changes : As part for privacy compliance we are required to implement BYOL (bring your own license) in our service and as a part of those changes we are making the following changes -
    a. Using ApiKeyAuthCredentials model to get credentials from customer using their keyvault rather than directly asking for the credentials in "/weather-data/:fetch" Api
    b. Using ApiKeyAuthCredentials model to get credentials from customer using their keyvault rather than directly asking for the credentials in "/scenes/satellite/ingest-data/{jobId}" and "/scenes/stac-collections/{collectionId}:search" APIs
    c. Updated example files for the above mentioned APIs

API Info: The Basics

Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.

  • Link to API Spec engagement record issue:

Is this review for (select one):

  • a private preview
  • a public preview
  • GA release

@JatinKhatri03 JatinKhatri03 requested a review from a team as a code owner May 19, 2023 06:10
@JatinKhatri03 JatinKhatri03 requested review from DominikMe and JeffreyRichter and removed request for a team May 19, 2023 06:10
@openapi-workflow-bot
Copy link

Hi, @JatinKhatri03 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 May 19, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️⚠️Breaking Change(Cross-Version): 16 Warnings warning [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    agfood.json 2023-06-01-preview(c6b105e) 2023-04-01-preview(main)

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

    Rule Message
    ⚠️ 1005 - RemovedPath The new version is missing a path that was found in the old version. Was path '/scenes/stac-collections/{collectionId}/features/{featureId}' removed or restructured?
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L13141:5
    ⚠️ 1014 - RemovingHeader The new version removs a required header 'x-ms-cache-hit'.
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L17411:15
    ⚠️ 1014 - RemovingHeader The new version removs a required header 'x-ms-response-latency-in-milliseconds'.
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L17415:15
    ⚠️ 1022 - RemovedAdditionalProperties The new version removes the 'additionalProperties' element.
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L22325:9
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L22313:9
    ⚠️ 1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L24459:11
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L24326:11
    ⚠️ 1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L24467:11
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L24333:11
    ⚠️ 1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L24510:11
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L24375:11
    ⚠️ 1026 - TypeChanged The new version has a different type 'integer' than the previous one 'string'.
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L24459:11
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L24326:11
    ⚠️ 1026 - TypeChanged The new version has a different type 'integer' than the previous one 'string'.
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L24467:11
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L24333:11
    ⚠️ 1026 - TypeChanged The new version has a different type 'number' than the previous one 'string'.
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L24510:11
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L24375:11
    ⚠️ 1033 - RemovedProperty The new version is missing a property found in the old version. Was 'providerClientId' renamed or removed?
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L22220:7
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L22203:7
    ⚠️ 1033 - RemovedProperty The new version is missing a property found in the old version. Was 'providerClientSecret' renamed or removed?
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L22220:7
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L22203:7
    ⚠️ 1033 - RemovedProperty The new version is missing a property found in the old version. Was 'providerClientId' renamed or removed?
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L22544:7
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L22539:7
    ⚠️ 1033 - RemovedProperty The new version is missing a property found in the old version. Was 'providerClientSecret' renamed or removed?
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L22544:7
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L22539:7
    ⚠️ 1033 - RemovedProperty The new version is missing a property found in the old version. Was 'providerAppId' renamed or removed?
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L24728:7
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L24728:7
    ⚠️ 1033 - RemovedProperty The new version is missing a property found in the old version. Was 'providerApiKey' renamed or removed?
    New: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L24728:7
    Old: Microsoft.AgFoodPlatform/preview/2023-04-01-preview/agfood.json#L24728:7
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️LintDiff: 2 Warnings warning [Detail]
    compared tags (via openapi-validator v2.1.3) new version base version
    package-2023-06-01-preview package-2023-06-01-preview(c6b105e) default(main)

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

    Rule Message Related RPC [For API reviewers]
    ⚠️ Formdata Check for appropriate use of formData parameters.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L1154
    ⚠️ Formdata Check for appropriate use of formData parameters.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L6220


    The following errors/warnings exist before current PR submission:

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

    Rule Message
    AvoidAnonymousTypes Inline/anonymous models must not be used, instead define a schema with a model name in the 'definitions' section and refer to it. This allows operations to share the models.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L15971
    AvoidAnonymousTypes Inline/anonymous models must not be used, instead define a schema with a model name in the 'definitions' section and refer to it. This allows operations to share the models.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L16039
    AvoidAnonymousTypes Inline/anonymous models must not be used, instead define a schema with a model name in the 'definitions' section and refer to it. This allows operations to share the models.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L16111
    ⚠️ OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'ApplicationDataModel'. Consider using the plural form of 'ApplicationData' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L15
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L225
    ⚠️ OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'ApplicationDataModel'. Consider using the plural form of 'ApplicationData' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L253
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L258
    ⚠️ LroHeaders A 202 response should include an Operation-Location response header.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L288
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L296
    ⚠️ OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'ApplicationDataModel'. Consider using the plural form of 'ApplicationData' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L323
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L328
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L352
    ⚠️ OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'ApplicationDataModel'. Consider using the plural form of 'ApplicationData' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L377
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L382
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L594
    ⚠️ OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'ApplicationDataModel'. Consider using the plural form of 'ApplicationData' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L622
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L627
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L634
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L658
    ⚠️ OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'ApplicationDataModel'. Consider using the plural form of 'ApplicationData' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L681
    ⚠️ PatchInOperationName 'PATCH' operation 'ApplicationData_CreateOrUpdate' should use method name 'Update'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L681
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L689
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L696
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L723
    ⚠️ OperationIdNounConflictingModelNames OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'ApplicationDataModel'. Consider using the plural form of 'ApplicationData' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L758
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L763
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L770
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L791
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L821
    ⚠️ ErrorResponse The error property in the error response schema should be required.
    Location: Microsoft.AgFoodPlatform/preview/2023-06-01-preview/agfood.json#L949
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️⚠️~[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 May 19, 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-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from ad1400c. 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
      warn	No file changes detected after generation
      warn	No package detected after generation
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented May 19, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Swagger Microsoft.AgFoodPlatform https://apiview.dev/Assemblies/Review/960efb410f844f28926a848ab143e318

    @openapi-workflow-bot
    Copy link

    Hi @JatinKhatri03, 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.

    Copy link
    Member

    @JeffreyRichter JeffreyRichter left a comment

    Choose a reason for hiding this comment

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

    I'm assuming that these lowercase to uppercase case changes are not breaking with a prior release of the service. I also see some properties that still start with a lowercase letter and I think this is a lack of consistency. Also, we tend to start everything with a lowercase letter so I'm not sure that changing to an initial uppercase letter is the right thing to do anyway.

    I'll approve this PR but you may want to reconsider the case changes (especially if they are breaking from a previously released version of the service).

    }
    },
    "BasicAuthCredentials": {
    "description": "BasicAuthCredentials.",
    Copy link
    Member

    @BlackRider97 BlackRider97 May 22, 2023

    Choose a reason for hiding this comment

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

    description can be improved for all new models being introduced

    @@ -24768,7 +24783,7 @@
    },
    "endTimeHours": {
    "format": "int32",
    "description": "End of time range. Supported ranges are from 0 to 240. (Only applicable for DTN.ClearAg extension.)",
    "description": "End of time range. (Only applicable for DTN.ClearAg extension.)",
    Copy link
    Member

    Choose a reason for hiding this comment

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

    since DTN extension is not available then comment is still valid ?

    }
    }
    ],
    "x-ms-discriminator-value": "ApiKeyAuth"
    Copy link
    Member

    Choose a reason for hiding this comment

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

    The Azure Naming Guidelines recommend that the discriminator field be named kind

    @JeffreyRichter JeffreyRichter added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label May 24, 2023
    @openapi-workflow-bot
    Copy link

    Hi, @JatinKhatri03, 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

    @tjprescott tjprescott merged commit ad1400c into Azure:main Jun 12, 2023
    harryli0108 pushed a commit to harryli0108/azure-rest-api-specs that referenced this pull request Jul 28, 2023
    * Adding BYOL changes
    
    * Resolving failing checks
    
    * Reverting lowercase to uppercase change
    
    * Resolving comments
    
    * restoring scenes_list file
    
    * Changing model name from BasicAuthCredentials to OAuthClientCredentials
    
    * adding changest to new apiversion
    
    * Updating examples
    
    * Removing null from the query example in swagger
    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 CI-MissingBaseCommit data-plane new-api-version
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    6 participants