From 5b010a8bbc1909169cac92851189646b006d41d1 Mon Sep 17 00:00:00 2001 From: maurei Date: Thu, 26 Nov 2020 21:35:01 +0100 Subject: [PATCH 1/2] adjust index.html, fix generate example script --- docs/generate-examples.ps1 | 12 ++++++++++-- docs/home/index.html | 5 +++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/generate-examples.ps1 b/docs/generate-examples.ps1 index 6b6e80d6ac..64c9b991c6 100644 --- a/docs/generate-examples.ps1 +++ b/docs/generate-examples.ps1 @@ -3,11 +3,19 @@ # This script generates response documents for ./request-examples function Kill-WebServer { - $tcpConnections = Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue + $tcpConnections = $null + if ($IsMacOs || $IsLinux) { + $tcpConnections = $(lsof -ti:8080) + } + elseif ($IsWindows) { + $tcpConnections = $(Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue).OwningProcess + } + if ($tcpConnections -ne $null) { Write-Output "Stopping web server" - Get-Process -Id $tcpConnections.OwningProcess | Stop-Process + Get-Process -Id $tcpConnections | Stop-Process } + } function Start-Webserver { diff --git a/docs/home/index.html b/docs/home/index.html index 1b580e172c..f7f2f2245c 100644 --- a/docs/home/index.html +++ b/docs/home/index.html @@ -3,7 +3,7 @@ - JsonApiDotNetCore + JSON:API .NET Core @@ -213,7 +213,8 @@

Response

"links": { "self": "/articles/1/relationships/author", "related": "/articles/1/author" - } + }, + "data": { "type": "people", "id": "1" } } }, "links": { From 24a257bf99c526f881d28288782a9fbf501aedab Mon Sep 17 00:00:00 2001 From: Bart Koelman Date: Fri, 27 Nov 2020 14:16:57 +0100 Subject: [PATCH 2/2] whitespace; fix variable name --- docs/generate-examples.ps1 | 10 +++++----- docs/home/index.html | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/generate-examples.ps1 b/docs/generate-examples.ps1 index 64c9b991c6..d66d331c5a 100644 --- a/docs/generate-examples.ps1 +++ b/docs/generate-examples.ps1 @@ -3,17 +3,17 @@ # This script generates response documents for ./request-examples function Kill-WebServer { - $tcpConnections = $null + $processId = $null if ($IsMacOs || $IsLinux) { - $tcpConnections = $(lsof -ti:8080) + $processId = $(lsof -ti:8080) } elseif ($IsWindows) { - $tcpConnections = $(Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue).OwningProcess + $processId = $(Get-NetTCPConnection -LocalPort 14141 -ErrorAction SilentlyContinue).OwningProcess } - if ($tcpConnections -ne $null) { + if ($processId -ne $null) { Write-Output "Stopping web server" - Get-Process -Id $tcpConnections | Stop-Process + Get-Process -Id $processId | Stop-Process } } diff --git a/docs/home/index.html b/docs/home/index.html index f7f2f2245c..28a611e0ab 100644 --- a/docs/home/index.html +++ b/docs/home/index.html @@ -214,7 +214,10 @@

Response

"self": "/articles/1/relationships/author", "related": "/articles/1/author" }, - "data": { "type": "people", "id": "1" } + "data": { + "type": "people", + "id": "1" + } } }, "links": {