-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: generate the values schema to not require external URLs
fixes #431
- Loading branch information
1 parent
1b9c55d
commit 22939b1
Showing
9 changed files
with
131 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,6 @@ dist/ | |
values-*.yaml | ||
.history | ||
/public | ||
|
||
/charts/netbox/values.schema.json | ||
/node_modules |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import $RefParser from '@apidevtools/json-schema-ref-parser' | ||
import fs from 'fs' | ||
|
||
const mySchema = JSON.parse( | ||
fs.readFileSync('./charts/netbox/values.schema.in.json', 'utf-8') | ||
) | ||
|
||
try { | ||
await $RefParser.dereference(mySchema) | ||
fs.writeFileSync( | ||
'./charts/netbox/values.schema.json', | ||
JSON.stringify(mySchema, undefined, 2) + '\n' | ||
) | ||
} catch (err) { | ||
console.error(err) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "netbox-chart", | ||
"version": "0.1.0", | ||
"type": "module", | ||
"description": "NetBox Helm Chart", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/netboxcommunity/helm-chart.git" | ||
}, | ||
"author": "Benjamin Reed <github@raccoonfink.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/netboxcommunity/helm-chart/issues" | ||
}, | ||
"homepage": "https://github.com/netboxcommunity/helm-chart#readme", | ||
"scripts": { | ||
"schema": "node ./generate-values-schema.js" | ||
}, | ||
"devDependencies": { | ||
"@apidevtools/json-schema-ref-parser": "^11.7.2" | ||
} | ||
} |