Skip to content

Commit 4a19370

Browse files
authored
Merge branch 'main' into mdk/rfc-9535
2 parents c0733a9 + 506688d commit 4a19370

File tree

19 files changed

+1843
-741
lines changed

19 files changed

+1843
-741
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @oai/tsc @OAI/overlay-maintainers
1+
* @OAI/overlay-maintainers

.github/workflows/agenda.yaml

Lines changed: 97 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ on:
77
- cron: '0 17 * * 2'
88

99
jobs:
10-
create-discussion:
11-
permissions:
12-
discussions: write
10+
get-next-dates:
11+
permissions: {}
1312
runs-on: ubuntu-22.04
13+
outputs:
14+
meeting_dates: ${{ steps.get-next-meeting-dates.outputs.MEETING_DATES }}
15+
env:
16+
NUMBER_OF_INSTANCES: 2
17+
MEETING_INTERVAL_WEEKS: 2
1418
steps:
15-
- uses: actions/checkout@v5
1619
- name: Check if it's an alternate week
1720
id: check-week
1821
run: |
@@ -26,37 +29,109 @@ jobs:
2629
echo "Skipping odd week: $WEEK_NUMBER"
2730
echo "should_run=false" >> $GITHUB_OUTPUT
2831
fi
29-
- name: Get agenda text from template
32+
- name: Get Next Meeting Dates
3033
if: steps.check-week.outputs.should_run == 'true'
34+
id: get-next-meeting-dates
35+
run: |
36+
# Generate multiple meeting dates based on NUMBER_OF_INSTANCES
37+
MEETING_DATES="["
38+
for i in $(seq 1 $NUMBER_OF_INSTANCES); do
39+
# Calculate the date for the i-th Tuesday from now
40+
# For i=1, get next Tuesday; for i=2, get Tuesday after next, etc.
41+
WEEKS_AHEAD=$(((i - 1)*MEETING_INTERVAL_WEEKS))
42+
if [ $i -eq 1 ]; then
43+
DATE_CMD="next Tuesday"
44+
else
45+
DATE_CMD="next Tuesday +${WEEKS_AHEAD} weeks"
46+
fi
47+
MEETING_DATE=$(date -d "$DATE_CMD" +%Y-%m-%d)
48+
if [ $i -eq 1 ]; then
49+
MEETING_DATES="$MEETING_DATES\"$MEETING_DATE\""
50+
else
51+
MEETING_DATES="$MEETING_DATES,\"$MEETING_DATE\""
52+
fi
53+
done
54+
MEETING_DATES="$MEETING_DATES]"
55+
echo "MEETING_DATES=$MEETING_DATES" >> $GITHUB_OUTPUT
56+
- name: Set No Next Meeting Dates
57+
if: steps.check-week.outputs.should_run == 'false'
58+
run: |
59+
echo "MEETING_DATES=[]" >> $GITHUB_OUTPUT
60+
61+
create-discussion:
62+
needs: get-next-dates
63+
strategy:
64+
matrix:
65+
next_meeting_date: ${{ fromJson(needs.get-next-dates.outputs.meeting_dates) }}
66+
runs-on: ubuntu-22.04
67+
env:
68+
CATEGORY_ID: 'DIC_kwDOFXMeLs4COVB8'
69+
REPOSITORY_ID: 'MDEwOlJlcG9zaXRvcnkzNTk4NjU5MDI='
70+
permissions:
71+
discussions: write
72+
contents: read
73+
steps:
74+
- uses: actions/checkout@v5
75+
- name: Get agenda text from template
3176
id: get-agenda
3277
run: |
3378
echo 'AGENDA<<EOF' >> $GITHUB_ENV
3479
cat .github/templates/agenda.md >> $GITHUB_ENV
3580
echo 'EOF' >> $GITHUB_ENV
36-
- name: Get Next Meeting Date
37-
if: steps.check-week.outputs.should_run == 'true'
38-
id: get-next-meeting-date
81+
- name: Define discussion title
82+
id: define-title
83+
run: |
84+
DISCUSSION_TITLE="Overlays Meeting (${{ matrix.next_meeting_date }})"
85+
echo "DISCUSSION_TITLE=$DISCUSSION_TITLE" >> $GITHUB_ENV
86+
- name: Search for existing discussion
87+
id: search-discussion
88+
env:
89+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3990
run: |
40-
NEXT_MEETING_DATE=$(date -d "next Tuesday" +%Y-%m-%d)
41-
echo "NEXT_MEETING_DATE=$NEXT_MEETING_DATE" >> $GITHUB_ENV
91+
FOUND_DISCUSSIONS=$(gh api graphql -f query='
92+
query SearchDiscussionMutation ($repositoryOwner: String!, $repositoryName: String!, $categoryId: ID!) {
93+
repository(owner: $repositoryOwner, name: $repositoryName) {
94+
discussions(first: 10, orderBy: {direction: DESC, field: CREATED_AT}, categoryId: $categoryId) {
95+
nodes {
96+
title
97+
}
98+
}
99+
}
100+
}' \
101+
-f repositoryOwner="${{ github.repository_owner }}" \
102+
-f repositoryName="${{ github.event.repository.name }}" \
103+
-f categoryId="${{ env.CATEGORY_ID }}" \
104+
--jq '.data.repository.discussions.nodes[].title')
105+
106+
DISCUSSION_COUNT=0
107+
TARGET_TITLE="${{ env.DISCUSSION_TITLE }}"
108+
109+
# Iterate through all returned discussion titles
110+
while IFS= read -r discussion_title; do
111+
if [ "$discussion_title" = "$TARGET_TITLE" ]; then
112+
DISCUSSION_COUNT=1
113+
break
114+
fi
115+
done <<< "$FOUND_DISCUSSIONS"
116+
117+
echo "DISCUSSION_COUNT=$DISCUSSION_COUNT" >> $GITHUB_OUTPUT
118+
echo "Found $DISCUSSION_COUNT existing discussions with title: $TARGET_TITLE"
42119
- name: Create discussion with agenda
43-
if: steps.check-week.outputs.should_run == 'true'
120+
if: steps.search-discussion.outputs.DISCUSSION_COUNT == '0'
44121
id: create-repository-discussion
45-
uses: octokit/[email protected]
46122
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
with:
49-
variables: |
50-
body: "${{ env.AGENDA }}"
51-
title: "Overlays Meeting (${{ env.NEXT_MEETING_DATE }})"
52-
repositoryId: 'MDEwOlJlcG9zaXRvcnkzNTk4NjU5MDI='
53-
categoryId: 'DIC_kwDOFXMeLs4COVB8'
54-
query: |
123+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124+
run: |
125+
gh api graphql -f query='
55126
mutation CreateDiscussionMutation ($title: String!, $body: String!, $repositoryId: ID!, $categoryId: ID!) {
56127
createDiscussion(input: { title: $title, body: $body, repositoryId: $repositoryId, categoryId: $categoryId }) {
57128
discussion {
58129
title
130+
url
59131
}
60132
}
61-
}
62-
133+
}' \
134+
-f title="${{ env.DISCUSSION_TITLE }}" \
135+
-f body="${{ env.AGENDA }}" \
136+
-f repositoryId="${{ env.REPOSITORY_ID }}" \
137+
-f categoryId="${{ env.CATEGORY_ID }}"

.github/workflows/check-restricted-files.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
3434
echo This PR contains changes to files that should not be changed:
3535
echo
36-
git diff --compact-summary origin/${{ github.event.pull_request.base.ref }} origin/${{ github.event.pull_request.head.ref }} -- versions/[0-9].[0-9].[0-9].md
36+
git diff --compact-summary origin/${{ github.event.pull_request.base.ref }} -- versions/[0-9].[0-9].[0-9].md
3737
3838
exit 1

.github/workflows/validate-markdown.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,24 @@ on:
1313
workflow_dispatch: {}
1414

1515
jobs:
16-
mdv:
16+
lint:
1717
runs-on: ubuntu-latest
1818

1919
steps:
2020
- uses: actions/checkout@v5 # checkout repo content
2121
with:
2222
fetch-depth: 0
23-
# - name: use the javascript environment from main
24-
# run: |
25-
# git checkout remotes/origin/main -- package.json package-lock.json .markdownlint.yaml
23+
2624
- uses: actions/setup-node@v6 # setup Node.js
2725
with:
2826
node-version: "22.x"
29-
- name: Validate markdown
30-
run: npx --yes mdv versions/*.md
27+
3128
- name: Lint markdown
32-
run: npx --yes markdownlint-cli --config .markdownlint.yaml versions/*.md
29+
run: npx --yes markdownlint-cli2 --config .markdownlint.yaml npx markdownlint-cli2 *.md schemas/**/*.md versions/*.md
30+
31+
- name: Check links in markdown files
32+
uses: umbrelladocs/action-linkspector@v1
33+
with:
34+
reporter: github-check
35+
fail_level: any
36+
filter_mode: file

.linkspector.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dirs:
2+
- ./
3+
useGitIgnore: true

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ Pull requests must come from a fork; create a fresh branch on your fork based on
3434

3535
Overview of branches:
3636

37-
The `main` branch holds
37+
The `main` branch holds
38+
3839
- published versions of the specification, named `versions/X.Y.Z.md`,
3940
- work-in-progress versions of the specification, named `versions/X.Y.Z-dev.md`,
40-
- sources for published schema versions in `schemas/vX.Y` folders and their tests in `tests/vX.Y` folders,
41+
- sources for published schema versions in `schemas/vX.Y` folders and their tests in `tests/vX.Y` folders,
4142
- sources for work-in-progress schema versions in `schemas/vX.Y-dev` folders and their tests in `tests/vX.Y-dev` folders,
4243
- utility scripts and supporting documentation.
4344

EDITORS.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Active
44

5-
* Lorna Mitchell [@lornajane](https://github.com/lornajane)
6-
* Mike Kistler [@mikekistler](https://github.com/mikekistler)
7-
* Vincent Biret [@baywet](https://github.com/baywet)
5+
- Lorna Mitchell [@lornajane](https://github.com/lornajane)
6+
- Mike Kistler [@mikekistler](https://github.com/mikekistler)
7+
- Vincent Biret [@baywet](https://github.com/baywet)
88

99
## Emeritus
1010

11-
* Darrel Miller [@darrelmiller](https://github.com/darrelmiller)
12-
* Greg Dennis [@gregsdennis](https://github.com/gregsdennis)
13-
* Kevin Swiber [@kevinswiber](https://github.com/kevinswiber)
14-
* Mike Ralphson [@MikeRalphson](https://github.com/MikeRalphson)
15-
* Ron Ratovsky [@webron](https://github.com/webron)
11+
- Darrel Miller [@darrelmiller](https://github.com/darrelmiller)
12+
- Greg Dennis [@gregsdennis](https://github.com/gregsdennis)
13+
- Kevin Swiber [@kevinswiber](https://github.com/kevinswiber)
14+
- Mike Ralphson [@MikeRalphson](https://github.com/MikeRalphson)
15+
- Ron Ratovsky [@webron](https://github.com/webron)

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,24 @@ If you are looking for tools to use with Overlays, try these:
3030

3131
(Is something missing from the list? Send us a pull request to add it!)
3232

33+
## Support for RFC9535 JSONPath
34+
35+
[RFC9535](https://www.rfc-editor.org/rfc/rfc9535) is a recent specification and libraries implementing JSONPath support might predate the RFC. Those libraries might differ entirely (expressions syntax is incompatible), implement additional capabilities (superset of the RFC), or support only a subset of the RFC.
36+
37+
In case the tool being use is not fully compliant with RFC9535, users MIGHT have to update some JSONPath query expressions to accommodate for the implementation in use.
38+
39+
This example JSONPath query expression:
40+
41+
```jsonpath
42+
$.paths.*.get.parameters[[email protected]=='filter' && @.in=='query']
43+
```
44+
45+
might require additional optional parenthesis with some implementations like so:
46+
47+
```jsonpath
48+
$.paths.*.get.parameters[?(@.name=='filter' && @.in=='query)']
49+
```
50+
3351
## Licensing
3452

3553
See: [License (Apache-2.0)](./LICENSE)

0 commit comments

Comments
 (0)