Skip to content

Commit 012cf4e

Browse files
committed
Update scripts for breaking change in PowerShell 7.3
1 parent b96cc4e commit 012cf4e

14 files changed

+46
-21
lines changed

appveyor.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ build_script:
9898
Write-Output ".NET version:"
9999
dotnet --version
100100
101+
Write-Output "PowerShell version:"
102+
pwsh --version
103+
101104
Write-Output "PostgreSQL version:"
102105
if ($IsWindows) {
103106
. "${env:ProgramFiles}\PostgreSQL\15\bin\psql" --version

docs/build-dev.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Requires -Version 7.0
1+
#Requires -Version 7.3
22

33
# This script builds the documentation website, starts a web server and opens the site in your browser. Intended for local development.
44

docs/generate-examples.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Requires -Version 7.0
1+
#Requires -Version 7.3
22

33
# This script generates response documents for ./request-examples
44

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/books
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/people/1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/books?include=author
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/books?fields%5Bbooks%5D=publishYear
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f "http://localhost:14141/api/people?filter=contains(name,'Shell')"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/books?sort=-publishYear
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f "http://localhost:14141/api/books?page%5Bsize%5D=1&page%5Bnumber%5D=2"
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/people `
24
-H "Content-Type: application/vnd.api+json" `
35
-d '{
4-
\"data\": {
5-
\"type\": \"people\",
6-
\"attributes\": {
7-
\"name\": \"Alice\"
6+
"data": {
7+
"type": "people",
8+
"attributes": {
9+
"name": "Alice"
810
}
911
}
1012
}'

docs/request-examples/011_CREATE_Book-with-Author.ps1

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/books `
24
-H "Content-Type: application/vnd.api+json" `
35
-d '{
4-
\"data\": {
5-
\"type\": \"books\",
6-
\"attributes\": {
7-
\"title\": \"Valperga\",
8-
\"publishYear\": 1823
6+
"data": {
7+
"type": "books",
8+
"attributes": {
9+
"title": "Valperga",
10+
"publishYear": 1823
911
},
10-
\"relationships\": {
11-
\"author\": {
12-
\"data\": {
13-
\"type\": \"people\",
14-
\"id\": \"1\"
12+
"relationships": {
13+
"author": {
14+
"data": {
15+
"type": "people",
16+
"id": "1"
1517
}
1618
}
1719
}
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/books/1 `
24
-H "Content-Type: application/vnd.api+json" `
35
-X PATCH `
46
-d '{
5-
\"data\": {
6-
\"type\": \"books\",
7-
\"id\": \"1\",
8-
\"attributes\": {
9-
\"publishYear\": 1820
7+
"data": {
8+
"type": "books",
9+
"id": "1",
10+
"attributes": {
11+
"publishYear": 1820
1012
}
1113
}
1214
}'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
#Requires -Version 7.3
2+
13
curl -s -f http://localhost:14141/api/books/1 `
24
-X DELETE

0 commit comments

Comments
 (0)