Skip to content

Commit 5467c79

Browse files
maureiBart Koelman
and
Bart Koelman
authored
Docs hotfix (#896)
* adjust index.html, fix generate example script * whitespace; fix variable name Co-authored-by: Bart Koelman <bart@degreed.com>
1 parent 7c7702a commit 5467c79

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

docs/generate-examples.ps1

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,19 @@
33
# This script generates response documents for ./request-examples
44

55
function Kill-WebServer {
6-
$tcpConnections = Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue
7-
if ($tcpConnections -ne $null) {
6+
$processId = $null
7+
if ($IsMacOs || $IsLinux) {
8+
$processId = $(lsof -ti:8080)
9+
}
10+
elseif ($IsWindows) {
11+
$processId = $(Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue).OwningProcess
12+
}
13+
14+
if ($processId -ne $null) {
815
Write-Output "Stopping web server"
9-
Get-Process -Id $tcpConnections.OwningProcess | Stop-Process
16+
Get-Process -Id $processId | Stop-Process
1017
}
18+
1119
}
1220

1321
function Start-Webserver {

docs/home/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta content="width=device-width, initial-scale=1.0" name="viewport">
6-
<title>JsonApiDotNetCore</title>
6+
<title>JSON:API .NET Core</title>
77
<meta content="" name="descriptison">
88
<meta content="" name="keywords">
99
<link href="favicon.ico" rel="icon">
@@ -213,6 +213,10 @@ <h4 class="title">Response</h4>
213213
"links": {
214214
"self": "/articles/1/relationships/author",
215215
"related": "/articles/1/author"
216+
},
217+
"data": {
218+
"type": "people",
219+
"id": "1"
216220
}
217221
}
218222
},

0 commit comments

Comments
 (0)