Skip to content

Conversation

@christothes
Copy link
Member

The model type for QueryEntitiesWithPartitionAndRowKey is currently generated incorrectly. This change corrects it.

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Changelog

Please ensure to add changelog with this PR by answering the following questions.

  1. What's the purpose of the update?
    • new service onboarding
    • new API version
    • update existing version for new feature
    • update existing version to fix swagger quality issue in s360
    • Other, please clarify
  2. When you are targeting to deploy new service/feature to public regions? Please provide date, or month to public if date is not available yet.
  3. When you expect to publish swagger? Please provide date, or month to public if date is not available yet.
  4. If it's an update to existing version, please select SDKs of specific language and CLIs that require refresh after swagger is published.
    • SDK of .NET (need service team to ensure code readiness)
    • SDK of Python
    • SDK of Java
    • SDK of Js
    • SDK of Go
    • PowerShell
    • CLI
    • Terraform
    • No, no need to refresh for updates in this PR

Contribution checklist:

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

  • Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

    • Adding new API(s)
    • Adding a new API version
    • Adding a new service
  • Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

  • If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist

If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in stable version
  • Removing properties in stable version
  • Removing API version(s) in stable version
  • Updating API in stable version with Breaking Change Validation errors
  • Updating API(s) in preview over 1 year

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.

Please follow the link to find more details on PR review process.

The model type for QueryEntitiesWithPartitionAndRowKey is currently generated incorrectly. This change corrects it.
@openapi-workflow-bot
Copy link

Hi, @christothes 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 Jan 5, 2021

    Swagger Validation Report

    ️❌BreakingChange: 4 Errors, 0 Warnings failed [Detail]

    Rule Message
    1008 - ModifiedOperationId The operation id has been changed from 'Table_QueryEntitiesWithPartitionAndRowKey' to 'Table_QueryEntityWithPartitionAndRowKey'. This will impact generated code.
    New: Microsoft.Tables/preview/2019-02-02/table.json#L401:7
    Old: Microsoft.Tables/preview/2019-02-02/table.json#L401:7
    1021 - AddedAdditionalProperties The new version adds an 'additionalProperties' element.
    New: Microsoft.Tables/preview/2019-02-02/table.json#L481:13
    Old: Microsoft.Tables/preview/2019-02-02/table.json#L481:13
    1033 - RemovedProperty The new version is missing a property found in the old version. Was 'odata.metadata' renamed or removed?
    New: azure-rest-api-specs/blob/5c6c733b55bff2d571f84649e6ccbc5b89a50b24/
    Old: Microsoft.Tables/preview/2019-02-02/table.json#L1692:7
    1033 - RemovedProperty The new version is missing a property found in the old version. Was 'value' renamed or removed?
    New: azure-rest-api-specs/blob/5c6c733b55bff2d571f84649e6ccbc5b89a50b24/
    Old: Microsoft.Tables/preview/2019-02-02/table.json#L1692:7
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.

    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ModelValidation succeeded [Detail] [Expand]
    Validation passes for ModelValidation.
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️[Staging] Cross Version BreakingChange (Base on preview version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️[Staging] Cross Version BreakingChange (Base on stable version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jan 5, 2021

    Swagger pipeline restarted successfully, please wait for status update in this comment.

    @openapi-workflow-bot
    Copy link

    NewApiVersionRequired reason:

    A service’s API is a contract with customers and is represented by using the api-version query parameter. Changes such as adding an optional property to a request/response or introducing a new operation is a change to the service’s contract and therefore requires a new api-version value. This is critically important for documentation, client libraries, and customer support.

    EXAMPLE: if a customer calls a service in the public cloud using api-version=2020-07-27, the new property or operation may exist but if they call the service in a government cloud, air-gapped cloud, or Azure Stack Hub cloud using the same api-version, the property or operation may not exist. Because there is no clear relationship between the service api-version and the new property/operation, customers can’t trust the documentation and Azure customer have difficulty helping customers diagnose issues. In addition, each client library version documents the service version it supports. When an optional property or new operation is added to a service and its Swagger, new client libraries must be produced to expose this functionality to customers. Without updating the api-version, it is unclear to customers which version of a client library supports these new features.

    @openapi-workflow-bot
    Copy link

    Hi @christothes, 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.ma/swaggerfeedback.

    @christothes
    Copy link
    Member Author

    The only breaking change that appears to be related to this change is the first one "1021 - AddedAdditionalProperties". In this case the property is not being added, rather the model type is being changed.

    Justification for this change is that the newly specified model is actually what the service returns. A .NET client using the existing spec would not the response of QueryEntitiesWithPartitionAndRowKey serialize correctly with generated code.

    @jhendrixMSFT

    @jhendrixMSFT
    Copy link
    Member

    The operation ID makes it sound like multiple entities could be returned. Does it need to be updated?

    @christothes
    Copy link
    Member Author

    The operation ID makes it sound like multiple entities could be returned. Does it need to be updated?

    Yes, I think that would make sense. By definition the response can only be a single entity, as it is a query by primary key (PartitionKey and RowKey)

    @jhendrixMSFT
    Copy link
    Member

    Will you be updating the operation ID accordingly?

    @christothes
    Copy link
    Member Author

    Will you be updating the operation ID accordingly?

    Just updated it. Sorry for the delay!

    @lmazuel lmazuel merged commit dc3ba32 into Azure:master Jan 15, 2021
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants