Skip to content

Added automated schema to md generation #792

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

Closed
wants to merge 1 commit into from

Conversation

bismuth01
Copy link

Added a pnpm script schema2md which generates .md files for all schemas in src/resources/schema and outputs them in src/resources/schema2md.

@ravenac95
Copy link
Member

/validate b4f2701

@oso-prs
Copy link

oso-prs bot commented Jun 25, 2025

Validation Results

⛔ Found 1 errors ⛔

commit b4f27016f87c561bf74a632fc09f873bcbcc8c23


Overview

0xbfbaa134ed5da64eca6b6fd39c04b273b6bb600d

  • ⚠️ missing validator for factory on arbitrum_one

  • ✅ 0xbfbaa134ed5da64eca6b6fd39c04b273b6bb600d is a 'contract' on arbitrum_one

0xe4666f0937b62d64c10316db0b7061549f87e95f

  • ✅ 0xe4666f0937b62d64c10316db0b7061549f87e95f is a 'contract' on arbitrum_one

0x0ed37f546c7b70cd787eee94a521f24cd6653442

  • ⚠️ missing validator for factory on arbitrum_one

  • ✅ 0x0ed37f546c7b70cd787eee94a521f24cd6653442 is a 'contract' on arbitrum_one

0xb45913337aca4988b08a61388c25e48ba5f6227c

  • ✅ 0xb45913337aca4988b08a61388c25e48ba5f6227c is a 'contract' on arbitrum_one

0xb5087f95643a9a4069471a28d32c569d9bd57fe4

  • ✅ 0xb5087f95643a9a4069471a28d32c569d9bd57fe4 is a 'contract' on arbitrum_one

https://defillama.com/protocol/timeless-finance

  • ✅ https://defillama.com/protocol/timeless-finance is a valid DefiLlama URL

  • ✅ https://defillama.com/protocol/timeless-finance is a valid DefiLlama slug

https://defillama.com/protocol/bunni

  • ✅ https://defillama.com/protocol/bunni is a valid DefiLlama URL

  • ✅ https://defillama.com/protocol/bunni is a valid DefiLlama slug

https://defillama.com/protocol/fluid

  • ❌ https://defillama.com/protocol/fluid is not a valid DefiLlama slug

  • ✅ https://defillama.com/protocol/fluid is a valid DefiLlama URL


### Arrays

* [Untitled array in Blockchain address](./blockchain-address-properties-tags.md) – `blockchain-address.json#/properties/tags`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm Untitled array is maybe not the most useful. I'm not sure that having Arrays as a top level item is generally useful either. I think we should instead only document the objects inside the array if they're object types and not any built in type.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we could change in jsonschema2md?

@bismuth01
Copy link
Author

I don't think there is anything more jsonschema2md provides for such customization. They also have an example array schema with it's respective generated array readme and array items readme.

A script can be created to remove the generated array schema readme, but removing it from the base README can't seem to be automated.

However, I think custom scripts can be made to do the job if only a fixed types of tags are used.

@ryscheng
Copy link
Member

These markdown files are not very useful right now, considering most fields are either "Untitled" or "Unknown".
Do you have a plan on how to address this? If not, I suggest just closing this PR

@bismuth01
Copy link
Author

bismuth01 commented Jul 10, 2025

I can make a custom python script to create the required kind of readme for schemas if I am given some specifications. But opening a separate issue will be better to adhere to the topics of the issues and PRs.

@bismuth01 bismuth01 closed this Jul 12, 2025
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