ethereum / ethereum/execution-apis
Schemas don't have the right order of key value pairs
- Dominant language
- Io
- Stars
- 1.1k
- Forks
- 530
- Avg merge
- 5d 8h
- Merged PRs (30d)
- 9
Description
I am working on some tooling over execution APIs where rendering of docs happening through Openapi schema.
I was taking [transactions definition](https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml) as defined in this repository.
There are some issues:
* There is nothing like
```yaml
type: 'null'
```
rather it should be
```yaml
nullable: true
```
* `title` is defined before using `$ref` which results in local `title` to be replaced with `title` value inside `$ref`. So, to overwrite `title` value from `$ref`, it should be defined after `$ref` key.
* Also neighbour items of `$ref` get ignored and they are required to be wrapped under `allOf`.
Example
```diff
- nonce:
- title: nonce
- $ref: '#/components/schemas/uint'
+ nonce:
+ allOf:
+ - $ref: "#/components/schemas/uint"
+ - title: nonce
```
Following are comparisons of both rendered
Before: where local title values are coming from `$ref` component

After: where desired title values are getting rendered

Contributor guide
Assessment
This issue has not been assessed yet.