Skip to content

Commit a85ab91

Browse files
restfulheadPatrick Ruhkopf
authored andcommitted
feat: add ajv validator
0 parents  commit a85ab91

26 files changed

+7169
-0
lines changed

.gitignore

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# OS
2+
.DS_Store
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
12+
# Diagnostic reports (https://nodejs.org/api/report.html)
13+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
*.pid.lock
20+
21+
# Directory for instrumented libs generated by jscoverage/JSCover
22+
lib-cov
23+
24+
# Coverage directory used by tools like istanbul
25+
coverage
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
.env.test
64+
65+
.cache
66+
67+
# TypeScript output
68+
dist
69+
dist-test
70+
out
71+
72+
# Azure Functions artifacts
73+
bin
74+
obj
75+
appsettings.json
76+
local.settings.json
77+
78+
# Azurite artifacts
79+
__blobstorage__
80+
__queuestorage__
81+
__azurite_db*__.json

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions",
4+
"Azurite.azurite"
5+
]
6+
}

.vscode/launch.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to Node Functions",
6+
"type": "node",
7+
"request": "attach",
8+
"port": 9229,
9+
"preLaunchTask": "func: host start"
10+
},
11+
{
12+
"name": "Test current file",
13+
"type": "node",
14+
"request": "launch",
15+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
16+
"args": ["${relativeFile}", "--config", "${workspaceFolder}/jest.config.js", "--testTimeout", "300000", "--no-cache", "--runInBand", "--detectOpenHandles"],
17+
"internalConsoleOptions": "openOnSessionStart",
18+
"sourceMaps": true,
19+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
20+
"outputCapture": "std",
21+
"smartStep": true,
22+
"skipFiles": [
23+
"<node_internals>/**",
24+
"node_modules/**"
25+
],
26+
"resolveSourceMapLocations": [
27+
"${workspaceFolder}/**",
28+
"!**/node_modules/**"
29+
]
30+
},
31+
]
32+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"azureFunctions.deploySubpath": "example",
3+
"azureFunctions.postDeployTask": "npm install (functions)",
4+
"azureFunctions.projectLanguage": "TypeScript",
5+
"azureFunctions.projectRuntime": "~4",
6+
"debug.internalConsoleOptions": "neverOpen",
7+
"azureFunctions.projectLanguageModel": 4,
8+
"azureFunctions.projectSubpath": "example",
9+
"azureFunctions.preDeployTask": "npm prune (functions)"
10+
}

.vscode/tasks.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "func",
6+
"label": "func: host start",
7+
"command": "host start",
8+
"problemMatcher": "$func-node-watch",
9+
"isBackground": true,
10+
"dependsOn": "npm build (functions)",
11+
"options": {
12+
"cwd": "${workspaceFolder}/example"
13+
},
14+
"presentation": {
15+
"reveal": "always",
16+
"revealProblems": "onProblem",
17+
"close": false,
18+
}
19+
},
20+
{
21+
"type": "shell",
22+
"label": "npm build (functions)",
23+
"command": "npm run build",
24+
"dependsOn": "npm clean (functions)",
25+
"problemMatcher": "$tsc",
26+
"options": {
27+
"cwd": "${workspaceFolder}/example"
28+
},
29+
"presentation": {
30+
"reveal": "silent",
31+
"revealProblems": "onProblem",
32+
"close": true
33+
}
34+
},
35+
{
36+
"type": "shell",
37+
"label": "npm install (functions)",
38+
"command": "npm install",
39+
"options": {
40+
"cwd": "${workspaceFolder}/example"
41+
},
42+
"presentation": {
43+
"reveal": "silent",
44+
"revealProblems": "onProblem",
45+
"close": true
46+
}
47+
},
48+
{
49+
"type": "shell",
50+
"label": "npm prune (functions)",
51+
"command": "npm prune --production",
52+
"dependsOn": "npm build (functions)",
53+
"problemMatcher": [],
54+
"options": {
55+
"cwd": "${workspaceFolder}/example"
56+
},
57+
"presentation": {
58+
"reveal": "silent",
59+
"revealProblems": "onProblem",
60+
"close": true
61+
}
62+
},
63+
{
64+
"type": "shell",
65+
"label": "npm clean (functions)",
66+
"command": "npm run clean",
67+
"dependsOn": "npm install (functions)",
68+
"options": {
69+
"cwd": "${workspaceFolder}/example"
70+
},
71+
"presentation": {
72+
"reveal": "silent",
73+
"revealProblems": "onProblem",
74+
"close": true
75+
}
76+
}
77+
]
78+
}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Azure Functions Open API specification validation
2+
3+
Azurite start
4+
npm run watch
5+
6+
TODO: eslint

example/.funcignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.js.map
2+
*.ts
3+
.git*
4+
.vscode
5+
__azurite_db*__.json
6+
__blobstorage__
7+
__queuestorage__
8+
local.settings.json
9+
test
10+
tsconfig.json

example/host.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "2.0",
3+
"logging": {
4+
"applicationInsights": {
5+
"samplingSettings": {
6+
"isEnabled": true,
7+
"excludedTypes": "Request"
8+
}
9+
}
10+
},
11+
"extensionBundle": {
12+
"id": "Microsoft.Azure.Functions.ExtensionBundle",
13+
"version": "[3.*, 4.0.0)"
14+
}
15+
}

0 commit comments

Comments
 (0)