Skip to content

Inomurko/fix openapi spec for dtl#2547

Merged
mergify[bot] merged 4 commits intoethereum-optimism:developfrom
InoMurko:inomurko/fix_openapi
May 6, 2022
Merged

Inomurko/fix openapi spec for dtl#2547
mergify[bot] merged 4 commits intoethereum-optimism:developfrom
InoMurko:inomurko/fix_openapi

Conversation

@InoMurko
Copy link
Contributor

@InoMurko InoMurko commented May 5, 2022

Description
Generating client code from the OpenAPI spec in the repo produced a number of errors.
Same for using the online editor: https://editor.swagger.io/

docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
    -i https://raw.githubusercontent.com/ethereum-optimism/optimism/develop/packages/data-transport-layer/openapi.yml \
    -g java \
    -o /local/out/java

@changeset-bot
Copy link

changeset-bot bot commented May 5, 2022

⚠️ No Changeset found

Latest commit: 4fd211c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mergify mergify bot requested review from Inphi and cfromknecht May 5, 2022 18:43
@InoMurko
Copy link
Contributor Author

InoMurko commented May 5, 2022

Now it should be fixed:

docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
    -i https://raw.githubusercontent.com/ethereum-optimism/optimism/7d7b96fb636414679fd38a7f36e8e26cb95fe451/packages/data-transport-layer/openapi.yml \
    -g java \
    -o /local/out/java

by using format: "uint64", java client produces correct types (for example ethereum context):

public static final String SERIALIZED_NAME_BLOCK_NUMBER = "blockNumber";
  @SerializedName(SERIALIZED_NAME_BLOCK_NUMBER)
  private Long blockNumber;

same goes for go:

// EthereumContext struct for EthereumContext
type EthereumContext struct {
	BlockNumber *int64 `json:"blockNumber,omitempty"`
	Timestamp *int64 `json:"timestamp,omitempty"`
	BlockHash *string `json:"blockHash,omitempty"`
}

@mergify
Copy link
Contributor

mergify bot commented May 6, 2022

This PR has been added to the merge queue, and will be merged soon.

@mergify
Copy link
Contributor

mergify bot commented May 6, 2022

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify mergify bot merged commit 1e4e4b3 into ethereum-optimism:develop May 6, 2022
This was referenced May 10, 2022
theochap added a commit that referenced this pull request Dec 10, 2025
## Description

Increase timeout for e2e tests. Should help with flakiness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants