This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Feature.DI | |
{ | |
public class RegisterContainer : IServicesConfigurator | |
{ | |
public void Configure(IServiceCollection serviceCollection) | |
{ | |
serviceCollection.AddTransient<ItemAuthorizationHelper, CustomItemAuthorizationHelper>(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
pwsh.exe -ExecutionPolicy RemoteSigned -File '.githooks\pre-commit.ps1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
Get-ChildItem .\tests\api-tests\**.ps1 -Recurse | ForEach-Object { | |
Set-Location -Path $_.Directory | |
Write-Host "Running test: " .\ $_.Directory.Name \ $_.Name " -> " -NoNewline -Separator '' | |
(& $_.FullName) ? "Passed" : "Failed" | |
} | |
} | |
catch { | |
Write-Host "Failed" | |
throw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Host": "localhost:3000" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-06/schema#", | |
"$ref": "#/definitions/Welcome1", | |
"definitions": { | |
"Welcome1": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"SomeObject": { | |
"$ref": "#/definitions/SomeObject" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$config = Get-Content ../config.json | ConvertFrom-Json | |
$apiRoute = $config.SitecoreHost + '/api/<area>/<api1>' | |
$result = Invoke-WebRequest $apiRoute | |
Test-Json -Json $result -SchemaFile .\response-schema.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
└─ 📂 tests | |
└─ 📂 api-tests | |
└─ 📂 <area> | |
├─ 📂 <api1> | |
│ ├─ 📄 response-schema.json | |
│ └─ 📄 test.ps1 | |
├─ 📂 <api2> | |
│ ├─ 📄 response-schema.json | |
│ └─ 📄 test.ps1 | |
├─ 📂 <api3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { NextRequest } from 'next/server' | |
export const config = { | |
matcher: [ | |
/* force middleware on root */ | |
'/', | |
/* bypass middleware for Sitecore Experience Editor */ | |
'/((?!api/editing/.?).*)', | |
], | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$postParams = @{data='qwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwerty |