Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/generate-examples.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
# This script generates response documents for ./request-examples

function Kill-WebServer {
$tcpConnections = Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue
if ($tcpConnections -ne $null) {
$processId = $null
if ($IsMacOs || $IsLinux) {
$processId = $(lsof -ti:8080)
}
elseif ($IsWindows) {
$processId = $(Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue).OwningProcess
}

if ($processId -ne $null) {
Write-Output "Stopping web server"
Get-Process -Id $tcpConnections.OwningProcess | Stop-Process
Get-Process -Id $processId | Stop-Process
}

}

function Start-Webserver {
Expand Down
6 changes: 5 additions & 1 deletion docs/home/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>JsonApiDotNetCore</title>
<title>JSON:API .NET Core</title>
<meta content="" name="descriptison">
<meta content="" name="keywords">
<link href="favicon.ico" rel="icon">
Expand Down Expand Up @@ -213,6 +213,10 @@ <h4 class="title">Response</h4>
"links": {
"self": "/articles/1/relationships/author",
"related": "/articles/1/author"
},
"data": {
"type": "people",
"id": "1"
}
}
},
Expand Down