Azure / Azure/azure-rest-api-specs

`JobState` defined separately in common.json and questionanswering-authoring.json

Open
#21,173 0 comments 0 reactions 0 assignees View on GitHub
Cognitive - Language Language Service Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 37m
Merged PRs (30d)
446

Description

Both _common.json_ and _questionanswering-authoring.json_ define a `JobState` model that has separate defintions. The purpose of _common.json_ is to define common models that all swaggers therein reference. From past discussions, _questionanswering-authoring.json_ was supposed to have ref'd this common `JobState`, which did not happen prior to 2022-05-01 GA.

This will continue to cause lintdiff errors, however, as seen in PR #21030. We need to find a way to solve this problem. One way, since model names are irrelevant to actual service responses, is to change the mode name but keep the `x-ms-class-name` the same. SDK devs could also use an autorest transform to rename them.

However, that would still cause a breaking change that could affect any other customer-generated clients so that might not be ideal.

Alternatively, can we align the `JobState` models in a non-breaking way and then just reference the one in _common.json_ in _questionanswering-authoring.json_ as originally intended?

Contributor guide

Open the contributing guide

Research direction

Compare the JobState definitions in _common.json_ and _questionanswering-authoring.json_, then review PR #21030 for the lintdiff failure. Determine whether the models can be aligned without a breaking change and whether questionanswering-authoring.json can reference the common model; done means the duplicate lintdiff error is resolved with a non-breaking approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.