-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add a comprehensive dfx json reference #2361
Merged
mergify
merged 14 commits into
master
from
SDK-287-add-a-comprehensive-dfx-json-reference-to-docs-site
Jul 21, 2022
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
55c9911
schemars works
sesi200 e6d28e1
add dfx schema command
sesi200 fc203da
label the fields nicely
sesi200 9de7e24
add documentatino
sesi200 7df1f6c
changelog
sesi200 8761ca4
add e2e
sesi200 9f05cda
Merge branch 'master' into SDK-287-add-a-comprehensive-dfx-json-refer…
sesi200 f775cd6
change to automated update-docs workflow
sesi200 bc08bae
update to workflow to keep docs updated
sesi200 ca578a3
Merge branch 'master' into SDK-287-add-a-comprehensive-dfx-json-refer…
sesi200 e3f90e9
macos-10.15 is deprecated
sesi200 2de0de0
Merge branch 'SDK-287-add-a-comprehensive-dfx-json-reference-to-docs-…
sesi200 f522758
Apply suggestions from code review
sesi200 6e12c16
no need to be fancy, this works as well
sesi200 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Update Docs | ||
on: | ||
pull_request | ||
|
||
jobs: | ||
update_dfx_json_schema: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: ["1.60.0"] | ||
os: [ ubuntu-20.04 ] | ||
steps: | ||
- uses: actions/checkout@v3.0.2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Install Rust | ||
run: | | ||
rustup update ${{ matrix.rust }} --no-self-update | ||
rustup component add clippy | ||
rustup default ${{ matrix.rust }} | ||
|
||
- name: Check cargo build | ||
run: cargo build | ||
- name: Show download worked | ||
run: cargo run -- --version | ||
- name: Update docs/dfx-json-schema.json | ||
run: | | ||
cargo run -- schema --outfile docs/dfx-json-schema.json | ||
cat docs/dfx-json-schema.json | ||
if ! git diff-index --quiet HEAD -- docs/dfx-json-schema.json; then | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git add docs/dfx-json-schema.json | ||
git commit -m "update dfx-json-schema" | ||
git push | ||
fi |
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
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
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,40 @@ | ||
# dfx schema | ||
|
||
The `dfx schema` command prints the schema for `dfx.json`. | ||
|
||
## Basic usage | ||
|
||
``` bash | ||
dfx schema [option] [flag] | ||
``` | ||
|
||
## Flags | ||
|
||
You can use the following optional flags with the `dfx schema` command. | ||
|
||
| Flag | Description | | ||
|-------------------|-------------| | ||
| `-h`, `--help` | Displays usage information. | | ||
| `-V`, `--version` | Displays version information. | | ||
|
||
## Options | ||
|
||
You can use the following option with the `dfx schema` command. | ||
|
||
| Option | Description | | ||
|---------------|-------------------------------------------------------------------------------------------------------------------| | ||
| `--outfile <outfile>` | Specifies a file to output the schema to instead of printing it to stdout. | | ||
|
||
## Examples | ||
|
||
You can print the schema for `dfx.json` by running the following command: | ||
|
||
``` bash | ||
dfx schema | ||
``` | ||
|
||
If you want to write the schema to `path/to/file/schema.json`, you can do so by running the following command: | ||
|
||
``` bash | ||
dfx schema --outfile path/to/file/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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more of a fyi, cause I'm not 100% certain here (help @adamspofford-dfinity), but I think this step is unnecessary since we have
rust-toolchain.toml
file - cargo should be able to use the correct version hereto verify, you might want to try
rustc --version
instead and see if its1.60.0