Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.54k stars 5k forks source link

Add check `Uniform Versioning Validation` #29065

Open mikeharder opened 3 months ago

mikeharder commented 3 months ago

Notes from @konrad-jamrozik

A quickstart guide I wrote for creating such checks is here:

Closely related to:

konrad-jamrozik commented 3 months ago

Avocado was in effect our "README validation" check before. There is bunch of work related to it:

The README validation ideally should build directly on this work (once ready):

For suppressions, we probably should also support the README.md suppressions and sdk-suppressions.yaml:

konrad-jamrozik commented 2 months ago

I had a chat with @mikeharder. We are considering introducing a check named Uniform Versioning Validation. It would take care of directory structure validation and README.md validation, ensuring, among others, that they follow the uniform versioning principles as outlined in this PR:

konrad-jamrozik commented 2 months ago

A related work that will require understanding spec dir structure is checking if a PR is an "incremental TypeSpec" PR:

konrad-jamrozik commented 1 month ago

Some desired checks from @josefree :

For "uniform versioning", it would be great if there could be automatic check, and pop-up error in spec PR pipeline. For example,

  • The service version ❗must❗ be always represented in its entirety; any SDK or documentation referring to the service must encompass all of it.

and

  • stable and preview API versions ❗cannot❗ have the same date.
  • Moving to stable from preview by removing -preview suffix is ❗not allowed❗.