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

[Language] Restructure Language swagger files #31161

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

Conversation

bidisha-c
Copy link
Member

@bidisha-c bidisha-c commented Oct 22, 2024

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.

  • Design Document:
  • Previous API Spec Doc:
  • Updated paths:

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.

Copy link

openapi-pipeline-app bot commented Oct 22, 2024

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ The required check named TypeSpec Requirement (data-plane) has failed. TypeSpec usage is required for all new (aka "greenfield") services. The automation detected this pull request adds at least one new service that is violating this requirement. For information on converting from OpenAPI specs to TypeSpec specs or on data-plane (DP) policies, refer to aka.ms/azsdk/typespec. If you have general questions on resource provider (RP) policies, refer to aka.ms/rphelp
  • ❌ The required check named TypeSpec Validation has failed. 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

Copy link

openapi-pipeline-app bot commented Oct 22, 2024

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

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

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

What's the purpose of these changes? Just to better align with the TypeSpec migration? Relocating these files in main will break a lot of use cases including Azure SDKs - at least when we update references (but that can be fixed) - and likely Microsoft Learn docs.

If these are strictly to better compare with TypeSpec, I'd also recommend changing "-Authoring" directories to ".Authoring" to match with package names, which we more typically use "." in general naming.

@bidisha-c
Copy link
Member Author

@heaths to give some context, since we already have separate api release schedules for Language, our generated API docs are not reflecting the correct API versions for each capability.

So during the API review for the new API version we were asked to get this fixed. In an attempt to fix, that I submitted this PR to re-organize the swagger files according to the api grouping we will release.
I will also update the related documentation/SDKs in a separate PR.

The organization we are proposing (after discussion with our internal team):

Language/AnalyzeConversations - Typespec project Language.Conversations
Language/AnalyzeText - Typespce project Language.AnalyzeText
Language/AnalyzeDocuments - Typespec project Language.AnalyzeDocuments
Language/AnalyzeConversations.Authoring (as suggested) Typespec project Language.AnalyzeConversations-authoring
Language/AnalyzeText.Authoring (as suggested) - Typespec project Language.AnalyzeText-authoring
Language/QuestionAnswering - not in typespec yet.
Language/QuestionAnswering.Authoring - not in type spec yet.

Adding @JeffreyRichter, @mikekistler @allenjzhang for their review/comments

@bidisha-c bidisha-c requested a review from heaths October 23, 2024 17:55
@JeffreyRichter
Copy link
Member

This PR looks pretty GREAT to me!
Then the tsp files will go in each service directory, right?
For example, the TSP files fpr AnalyzeConversations will fo in the /specificaiotn/cognitiveservices/data-plane/Langauge/AnalyzeConversations folder and each time this gets converted to swagger, the resulting swagger will go in the preview or stable folder with another subdir matching the api-version, right?

Can we get rid of the preview folder that is immediately under the Language directory? This folder currently has 2021-110-01-preview and 2023-04-15-preview subdirs in it.

@bidisha-c
Copy link
Member Author

@JeffreyRichter , yes, I am updating the typespecs as well to point to the correct swagger directory in this next iteration.

The preview folder under Language shows up as there were 2 random files which were part of the preview folders, which I am assuming should not have been merged. They show up as removed as they are not moved anywhere. Rather they are deleted.

  1. oav
  2. readme

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.

Great job! Thanks for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants