Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ specification and the JSON schema [specification][json-schema] to get started.
### Updating the specs

#### Compiling

The specification is split into multiple files to improve readability. The
spec can be compiled into a single document as follows:

Expand All @@ -37,23 +38,32 @@ will have all schema `#ref`s resolved.
#### Building the docs

Once you've updated something in the spec, you can use the docs generation tools
to view the updated specs locally.
to view the updated specs locally.

```console
$ npm run build:docs
$ npm run watch
$ npm run start
```

The `watch` command starts a local webserver serving the docs in-browser at
`http://0.0.0.0:8000` and it rebuilds when you update something in the specs.
Please reload the page to see your changes.
The `watch` command starts watching the local repository and rebuilds the spec
and copies the `README.md` into the build. Running npm start starts a local
development docusaurus server at `http://localhost:3000` and it rebuilds when you update something in the specs.
Sometimes you must reload the page to see your changes.

There is also search to see the search index built you must `npm run build:docs` this builds
a production ready version of the app, which will include a local search index. To access
the production build call `npm run serve`

For more information on the `@open-rpc/docusaurus-plugin` see the [docs](https://github.com/open-rpc/markdown-gen/blob/main/packages/docusaurus-plugin/README.md) for additional configuration options.

### Testing

There are several mechanisms for testing specification contributions and client
conformance.

#### Linting

First is the [OpenRPC validator][validator]. It performs some basic syntactic
checks on the generated specification.

Expand All @@ -64,12 +74,13 @@ OpenRPC spec validated successfully.
```

#### Spec tests

Next is `speccheck`. This tool validates the test cases in the `tests`
directory against the specification. There are two npm scripts to simplify this.
directory against the specification. There are two npm scripts to simplify this.

```console
$ npm run build:test
$ npm run test
$ npm run test
all passing.
```

Expand All @@ -81,7 +92,7 @@ $ speccheck -v
```

If you get an error that says: `speccheck: command not found`,
make sure that the go binary is in your $PATH:
make sure that the go binary is in your $PATH:

```console
$ export PATH=$HOME/go/bin:$PATH
Expand All @@ -102,6 +113,7 @@ pyspelling is a wrapper around either [Aspell](http://aspell.net/) or
one of those before running `pyspelling`.

#### Hive tests

Finally, the test cases in the `tests/` directory may be run against individual
execution client using the [`hive`][hive] simulator [`rpc-compat`][rpc-compat].
Please see the documentation in the aforementioned repositories for more
Expand Down Expand Up @@ -133,14 +145,13 @@ $ npm run graphql:validate

This repository is licensed under [CC0](LICENSE).


[playground]: https://ethereum.github.io/execution-apis/api-documentation/
[openrpc]: https://open-rpc.org
[validator]: https://open-rpc.github.io/schema-utils-js/functions/validateOpenRPCDocument.html
[graphql-schema]: http://graphql-schema.ethdevops.io/?url=https://raw.githubusercontent.com/ethereum/execution-apis/main/graphql.json
[eip-1767]: https://eips.ethereum.org/EIPS/eip-1767
[contributors-guide]: docs/reference/contributors-guide.md
[contributors-guide]: docs-api/docs/contributors-guide.md
[json-schema]: https://json-schema.org
[hive]: https://github.com/ethereum/hive
[rpc-compat]: https://github.com/ethereum/hive/tree/master/simulators/ethereum/rpc-compat
[test-gen]: docs/reference/tests.md
[test-gen]: docs-api/docs/tests.md
11 changes: 11 additions & 0 deletions docs-api/docs/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# GENERATED DOCUMENTATION - DO NOT EDIT THIS FILE
title: "License"
hide_table_of_contents: true
unlisted: true
sidebar_class_name: hidden
description: ""
---

See license
[License](https://github.com/ethereum/execution-apis/blob/main/LICENSE)
4 changes: 4 additions & 0 deletions docs-api/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}

.hidden {
display: none;
}

82 changes: 0 additions & 82 deletions docs/config/gatsby-config.js

This file was deleted.

7 changes: 4 additions & 3 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const config: Config = {

/*future: { v4: true },*/

/* TODO replace url: 'https://ethereum.github.io', */
url: 'https://open-rpc.github.io',
url: 'https://ethereum.github.io',
baseUrl: '/execution-apis/',

organizationName: 'ethereum',
Expand All @@ -22,8 +21,10 @@ const config: Config = {
i18n: { defaultLocale: 'en', locales: ['en'] },

plugins: [
"docusaurus-plugin-copy-page-button",

['@open-rpc/docusaurus-plugin', {
openRPCSpecPath: './execution-apis.json',
openRPCSpecPath: './openrpc.json',
docOutputPath: './docs-api/api',
indexSlug: '/'
}],
Expand Down
15 changes: 0 additions & 15 deletions open-rpc-generator-config.json

This file was deleted.

Loading
Loading