azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

ManagedCCF: Resolving mismatches with existing API specification

Open eddyashton opened this issue 1 year ago • 6 comments

Data Plane API - Pull Request

We've been tracking some minor discrepancies between the API as reported by this spec and the actual implementation. This resolves all known places where they diverge, so that this OpenAPI document (and the TypeSpec, though we're still not using that directly) accurately describes the responses produced by the service.

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: #23157

Is this review for (select one):

  • [ ] a private preview
  • [X] a public preview
  • [ ] GA release

Change Scope

This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.

  • Design Document: Issue tracking mismatches https://github.com/microsoft/CCF/issues/5691
  • Previous API Spec Doc: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/confidentialledger/data-plane/Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json
  • Updated paths:
    • GET /gov/service/info - corrected type of previousServiceCreationTransactionId response field (pem -> transactionId)
    • GET /gov/service/join-policy - corrected type of uvmEndorsements response field (Record -> Record<Record>)
    • GET /gov/members and GET /gov/members/{memberId} - document publicEncryptionKey field in response object
    • GET /gov/jwk - document keys field in response object
    • GET /gov/members/state-digests/{memberId} - corrected name of response field, and visibility of memberId

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 Swagger-Suppression-Process to get approval.

❔Got questions? Need additional info?? We are here to help!

Contact us!

The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

Checks stuck in `queued` state? 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.

eddyashton avatar Feb 19 '24 16:02 eddyashton

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.

Swagger Validation Report

️❌BreakingChange: 16 Errors, 0 Warnings failed [Detail]
Compared specs (v0.10.12) new version base version
mccfgov.json 2023-06-01-preview(6484eb9) 2023-06-01-preview(main)
Rule Message
1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2000:9
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1950:9
1017 - ReferenceRedirection The '$ref' property points to different models in the old and new versions.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2117:11
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2067:11
1021 - AddedAdditionalProperties The new version adds an 'additionalProperties' element.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2117:11
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2067:11
1023 - TypeFormatChanged The new version has a different format '' than the previous one 'byte'.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2117:11
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2067:11
1026 - TypeChanged The new version has a different type 'object' than the previous one 'string'.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2117:11
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2067:11
1033 - RemovedProperty The new version is missing a property found in the old version. Was 'digest' renamed or removed?
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1166:7
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1166:7
1034 - AddedRequiredProperty The new version lists new non-read-only properties as required: 'memberId'. These properties were not listed as required in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1166:7
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1166:7
1034 - AddedRequiredProperty The new version lists new non-read-only properties as required: 'stateDigest'. These properties were not listed as required in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1166:7
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1166:7
1034 - AddedRequiredProperty The new version lists new non-read-only properties as required: 'memberId, stateDigest'. These properties were not listed as required in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L431:13
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L431:13
1034 - AddedRequiredProperty The new version lists new non-read-only properties as required: 'memberId, stateDigest'. These properties were not listed as required in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L536:13
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L536:13
1034 - AddedRequiredProperty The new version lists new non-read-only properties as required: 'keys'. These properties were not listed as required in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1738:7
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1700:7
1034 - AddedRequiredProperty The new version lists new non-read-only properties as required: 'keys'. These properties were not listed as required in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L856:13
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L856:13
1034 - AddedRequiredProperty The new version lists new non-read-only properties as required: 'memberId, stateDigest'. These properties were not listed as required in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1163:5
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1163:5
1034 - AddedRequiredProperty The new version lists new non-read-only properties as required: 'keys'. These properties were not listed as required in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1735:5
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1697:5
1036 - ConstraintChanged The new version has a different 'pattern' value than the previous one.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2000:9
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1950:9
1041 - AddedPropertyInResponse The new version has a new property 'publicEncryptionKey' in response that was not found in the old version.
New: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1823:7
Old: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1777:7
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⚠️LintDiff: 0 Warnings warning [Detail]
Compared specs (v2.2.2) new version base version
package-2023-06-01-preview-mccf package-2023-06-01-preview-mccf(6484eb9) package-2023-06-01-preview-mccf(main)

The following errors/warnings exist before current PR submission:

Rule Message
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L80
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L134
:warning: PageableOperation Based on the response model schema, operation 'Proposals_GetActions' might be pageable. Consider adding the x-ms-pageable extension.
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L178
:warning: PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L178
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L185
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L239
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L247
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L305
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L313
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L416
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L473
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L524
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L575
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L622
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L941
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1038
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength).
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1089
:warning: PropertyType Property should have a defined type.
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1320
:warning: 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.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1361
:warning: 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.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1782
:warning: PropertyType Property should have a defined type.
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1832
:warning: PropertyType Property should have a defined type.
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1904
:warning: 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.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L1911
:warning: PropertyType Property should have a defined type.
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2004
:warning: AvoidNestedProperties Consider using x-ms-client-flatten to provide a better end user experience
Location: Microsoft.ManagedCcf/preview/2023-06-01-preview/mccfgov.json#L2007
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView 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.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️Automated merging requirements met succeeded [Detail] [Expand]
Posted by Swagger Pipeline | How to fix these errors?

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
Posted by Swagger Pipeline | How to fix these errors?

/azp run

mikeharder avatar Mar 09 '24 01:03 mikeharder

Azure Pipelines successfully started running 4 pipeline(s).

azure-pipelines[bot] avatar Mar 09 '24 01:03 azure-pipelines[bot]