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

Updating the API specification for confidential ledger for custom endpoints an… #30290

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

Conversation

amruthashree18
Copy link
Member

@amruthashree18 amruthashree18 commented Aug 21, 2024

…d custom roles change

Data 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

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

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.

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

Getting help

  • First, please carefully read through this PR description, from top to bottom.
  • 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.
  • 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.

@amruthashree18 amruthashree18 requested a review from a team as a code owner August 21, 2024 20:47
@amruthashree18 amruthashree18 requested review from allenjzhang and mikekistler and removed request for a team August 21, 2024 20:47
Copy link

openapi-pipeline-app bot commented Aug 21, 2024

Next Steps to Merge

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

Copy link

openapi-pipeline-app bot commented Aug 21, 2024

Generated ApiView

Language Package Name ApiView Link
Swagger Microsoft.ConfidentialLedger https://apiview.dev/Assemblies/Review/8c5b914dce434cac96b59a29df7ab349?revisionId=27f43e8b559641b6b0c23b6d0130add3

@ryazhang-microsoft
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

A few new problems popped up. Pls address and then re-request review.

Comment on lines 796 to 799
},
{
"$ref": "#/parameters/ModuleParameter"
}
Copy link
Member

Choose a reason for hiding this comment

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

GET operations may not have request bodies.

Suggested change
},
{
"$ref": "#/parameters/ModuleParameter"
}
}

Comment on lines 802 to 804
"200": {
"description": "Module for user defined endpoints."
},
Copy link
Member

Choose a reason for hiding this comment

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

This response should have a schema. I tried to figure out what should go here but it just wasn't obvious.

Comment on lines +828 to +830
{
"$ref": "#/parameters/RoleNameParameter"
}
Copy link
Member

Choose a reason for hiding this comment

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

GET operations may not have request bodies. Should this be a path or query param?

Copy link
Member

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

There are still problems in this PR. Rather than continue to go back and forth on this, let me explain how you can check for these problems yourself.
 
There is a tool called Spectral that will check an API definition for structural correctness and adherence to common best practices. There are instructions on how to install Spectral and run Spectral with our custom ruleset here:
 
https://github.com/Azure/azure-api-style-guide/blob/main/README.md#how-to-use-the-spectral-ruleset

You must fix any issues that report as errors. Warnings and hints are less severe so you can ignore these for now.

Please request a re-review from me when you have done this.

@amruthashree18
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@amruthashree18
Copy link
Member Author

amruthashree18 commented Sep 26, 2024

@mikekistler I have fixed the errors using spectral. Please review.

Copy link
Member

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

Looks good. 👍

I left a few comments for you to consider in this API version or before your GA.

],
"type": "object"
},
"path": {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"path": {
"path": {
"description": "A map of path to method endpoints for the path",

},
"/app/userDefinedEndpoints/runTimeOptions": {
"get": {
"operationId": " GetRuntimeOptions ",
Copy link
Member

Choose a reason for hiding this comment

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

Best to avoid leading and trailing whitespace in operationIds.

Suggested change
"operationId": " GetRuntimeOptions ",
"operationId": "GetRuntimeOptions",

},
{
"$ref": "#/parameters/BundleParameter"
}
Copy link
Member

Choose a reason for hiding this comment

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

You should add explicit support for If-Match header with etag to allow users to reliably update/replace endpoints.

@mikekistler mikekistler added the APIStewardshipBoard-SignedOff The Azure API Stewardship team has reviewed and approved the changes. label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIStewardshipBoard-SignedOff The Azure API Stewardship team has reviewed and approved the changes. data-plane new-api-version PublishToCustomers Acknowledgement the changes will be published to Azure customers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Azure Confidential Computing Ledger ] API Review
6 participants