Skip to content

Commit cff23f6

Browse files
Merge branch 'main' into go-validation
2 parents ec6ef01 + 34b917e commit cff23f6

File tree

8,775 files changed

+700627
-417999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,775 files changed

+700627
-417999
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@
208208
/specification/scheduler/ @pinwang81
209209

210210
# PRLabel: %Search
211-
/specification/search/data-plane/ @arv100kri @bleroy @BevLoh @giulianob
211+
/specification/search/data-plane/ @kuanlu95 @BevLoh @giulianob
212212

213213
# PRLabel: %Search
214-
/specification/search/resource-manager/ @efrainretana @conor-joplin @BevLoh @xiong-qiao @jonathanserbent @Draconicida @kuanlu95 @admayber
214+
/specification/search/resource-manager/ @efrainretana @BevLoh @xiong-qiao @jonathanserbent @Draconicida @kuanlu95 @admayber
215215

216216
/specification/serialconsole/ @amitchat @craigw @asinn826
217217

.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,16 @@ Do not skip the step that choose SDK generation method to ensure the user select
220220

221221
## Release readiness of SDK and information about the release pipeline
222222
Run [check package readiness](..\eng\common\instructions\azsdk-tools\check-package-readiness.instructions.md) to check the release readiness of an SDK package. This prompt will collect the required information from the user, execute the readiness check, and present the results.
223+
224+
## Instructions for GitHub coding agent to generate SDKs using GitHub.com
225+
Run only SDK generation step and Update SDK details back in issue description and release plan. Do not run TypeSpec validation, or service label check. This is applicable only when GitHub copilot coding agent is used to generate SDK and if a Release Plan is available in the context.
226+
Coding agent must wait until all SDK generation pipeline are in completed status and then fetch the SDK details from pipeline run. This is applicable only when a GitHub issue is assigned to GitHub coding agent to generate SDK from a TypeSpec project. This is not applicable when running Copilot from Visual Studio and VS Code.
227+
228+
steps:
229+
- Run SDK generation pipeline for the given TypeSpec path for all languages mentioned in the description.
230+
- Keep checking the pipeline status until pipeline is in completed or failed status.
231+
- Find SDK pull request links from the pipeline run.
232+
constraints:
233+
- Do not invoke other steps.
234+
- Do not modify main.tsp file or any files in TypeSpec project.
235+
- Do not add API version to an existing main.tsp if input API version is not present.

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ updates:
1717
- dependency-name: "typescript"
1818
# Updated manually by the Liftr team
1919
- dependency-name: "@azure-tools/typespec-liftr-base"
20-
- dependency-name: "@types/js-yaml"
21-
- dependency-name: "autorest"
22-
- dependency-name: "js-yaml"
2320
# Only allow patch updates for spec-gen-sdk
2421
- dependency-name: "@azure-tools/spec-gen-sdk"
2522
update-types: ["version-update:semver-minor", "version-update:semver-major"]
@@ -38,9 +35,6 @@ updates:
3835
eslint:
3936
patterns:
4037
- "*eslint*"
41-
openapi-validator:
42-
patterns:
43-
- "@microsoft.azure/openapi-validator*"
4438
versioning-strategy: increase-if-necessary
4539
- package-ecosystem: "npm"
4640
directories:
@@ -58,8 +52,6 @@ updates:
5852
- dependency-name: "typescript"
5953
# Points to "github:actions/github-script" since package isn't published to npmjs
6054
- dependency-name: "@types/github-script"
61-
# Stay on ^7 until ^10 increases in adoption
62-
- dependency-name: "cross-env"
6355
groups:
6456
eslint:
6557
patterns:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
applyTo: "**/*.json"
3+
---
4+
5+
# Copilot Review Instructions for reviewing OpenAPI v2
6+
7+
Please review OpenAPI v2 (Swagger) definition files with the following in mind:
8+
9+
## API Guidelines Alignment
10+
11+
- Ensure the API follows https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md.
12+
- Validate naming conventions for paths, parameters, and schemas.
13+
- Confirm consistent use of `x-ms-*` extensions where applicable.
14+
- Check for proper use of `operationId`, `description`, and `summary` fields.
15+
16+
## Versioning
17+
18+
- Ensure the API version is clearly defined and follows the `YYYY-MM-DD` format.
19+
- Confirm that breaking changes are not introduced in minor version updates.
20+
21+
## Security
22+
23+
- Validate that security definitions (e.g., OAuth2 scopes) are present and correctly applied.
24+
- Ensure no unsecured endpoints are exposed unless explicitly documented.
25+
26+
## Documentation
27+
28+
- Flag missing or vague descriptions for operations, parameters, and responses.
29+
- Recommend examples for request/response bodies where missing.
30+
31+
## Style
32+
33+
- Prefer camelCase for property names.
34+
- Avoid abbreviations unless industry-standard.
35+
36+
Respond in markdown format with clear suggestions and highlight any violations of the guidelines.

.github/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/shared/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/shared/test/readme.test.js

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ describe("readme", () => {
2626
expect(readme.path).toBe(resolve("/specs/foo/readme.md"));
2727
});
2828

29-
// TODO: Test that path is resolved against backpointer
30-
3129
it("can be created with string content", async () => {
3230
const folder = "/fake";
3331
const readme = new Readme(resolve(folder, "readme.md"), {
@@ -51,6 +49,59 @@ describe("readme", () => {
5149
expect(swaggerPaths.sort()).toEqual(expectedPaths.sort());
5250
});
5351

52+
// If tag names are duplicated (with no disambiguating conditionals), it's almost certainly a bug
53+
// in the readme that should be fixed.
54+
it("throws if duplicate tags", async () => {
55+
let content = `
56+
\`\`\`yaml $(tag) == 'package-2025-01-01'
57+
input-file:
58+
- foo.json
59+
\`\`\`
60+
\`\`\`yaml $(tag) == 'package-2025-01-01'
61+
input-file:
62+
- bar.json
63+
\`\`\`
64+
`;
65+
66+
let readme = new Readme("foo", { ...options, content });
67+
68+
expect(readme.getTags()).rejects.toThrowError(
69+
"Multiple input-file definitions for tag package-2025-01-01",
70+
);
71+
});
72+
73+
// A few existing specs use duplicate tags, but with conditionals to disambiguate at runtime.
74+
//
75+
// While this may work for generating the SDK itself (where you can specify the additional values),
76+
// it doesn't work for static analysis tools like LintDiff, since LintDiff wouldn't know what
77+
// additional values to pass to autorest.
78+
//
79+
// It may be possible to support this in spec-model, by allowing duplicate tags with different conditionals.
80+
// However, downstream users of the tags for static analysis would still need to throw. Also, we only
81+
// found two specs using this pattern (and only in the private repo). So I think it's better to continue
82+
// disallowing this, and instead rename the conflicting tags in the readme. Rather than adding
83+
// complexity to spec-model for an edge case (with workarounds).
84+
//
85+
// More details: https://github.com/Azure/azure-rest-api-specs/issues/37003
86+
it("throws if duplicate tags with different conditionals", async () => {
87+
let content = `
88+
\`\`\`yaml $(tag) == 'package-2025-01-01'
89+
input-file:
90+
- foo.json
91+
\`\`\`
92+
\`\`\`yaml $(tag) == 'package-2025-01-01' && $(test-condition)
93+
input-file:
94+
- bar.json
95+
\`\`\`
96+
`;
97+
98+
let readme = new Readme("foo", { ...options, content });
99+
100+
expect(readme.getTags()).rejects.toThrowError(
101+
"Multiple input-file definitions for tag package-2025-01-01",
102+
);
103+
});
104+
54105
it("can be created with empty content", async () => {
55106
const folder = "/fake";
56107
const readme = new Readme(resolve(folder, "readme.md"), {

.github/workflows/SDK-Suppressions-Label.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ name: SDK Suppressions
22

33
on:
44
pull_request:
5+
types:
6+
# default
7+
- opened
8+
- synchronize
9+
- reopened
10+
# re-run if base branch is changed, since previous merge commit may generate incorrect diff
11+
- edited
512
branches:
613
- main
714
- RPSaaSMaster

.github/workflows/arm-incremental-typespec.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ name: ARM Incremental TypeSpec
22

33
on:
44
pull_request:
5+
types:
6+
# default
7+
- opened
8+
- synchronize
9+
- reopened
10+
# re-run if base branch is changed, since previous merge commit may generate incorrect diff
11+
- edited
512
paths:
613
# Always trigger on changes to WF itself
714
- ".github/**"

.github/workflows/avocado-code.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: "Swagger Avocado - Analyze Code"
22

3-
on: pull_request
3+
on:
4+
pull_request:
5+
types:
6+
# default
7+
- opened
8+
- synchronize
9+
- reopened
10+
# re-run if base branch is changed, since previous merge commit may generate incorrect diff
11+
- edited
412

513
permissions:
614
contents: read

0 commit comments

Comments
 (0)