Skip to content
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

WIP: Schema tool #189

Merged
merged 46 commits into from
Aug 5, 2023
Merged

WIP: Schema tool #189

merged 46 commits into from
Aug 5, 2023

Conversation

egasimus
Copy link
Collaborator

Generate from CosmWasm schema:

  • Markdown documents
  • Interactive frontend

just some 'undefined' defaults left to go
@egasimus egasimus self-assigned this Jul 22, 2023
egasimus added a commit to hackbg/okp4-docs that referenced this pull request Jul 22, 2023
@egasimus
Copy link
Collaborator Author

egasimus commented Jul 22, 2023

Interactive schema browser

The goal is to make it easy to get started with scripting together various projects that expose services on the Cosmosverse. We leave the script writing to the user's preferred editor and the Fadroma SDK. But since neither i10e nor c5t can replace the responsibility of the user to know what's going on in order to get anywhere, we support the interchain ecosystem by publishing well-formatted documentation, API playgrounds, interactive map etc. of all interesting or interested chains. In return, the chains promote our SDK as the fastest way to build and validate any form of persistent blockchain-backed system out of their features.

Null state. Centered

Screenshot from 2023-07-23 02-29-46

Need to remove this gap.

Screenshot from 2023-07-23 02-29-27

From the beginning. Name, source, README and constructor first.

Screenshot from 2023-07-23 02-08-04

Message variants. Need to make values here editable for the buttons to make more sense.

Screenshot from 2023-07-23 02-08-24

@egasimus
Copy link
Collaborator Author

egasimus commented Jul 23, 2023

JSONSchema->Markdown Renderer

Very ad-hoc, basically tries to cover what I've seen cosmwasm-schema and serde do when writing for cosmwasm-std. All types that are part of a contract's API should be automatically extracted by cosmwasm-schema then this script lays them out in a human-readable form. This can be used to quickly distill a frontender-friendly pack of documentation from what the contract devs wrote in the Rust doc strings.

  • TODO: Generate TypeScript client classes from the schema
  • TODO: How to strip non-API stuff, e.g. doctests, from doc strings?
  • TODO: CLI command/CI action for automatically extracting and rendering all schemas from a project

@egasimus egasimus marked this pull request as ready for review August 5, 2023 14:09
@egasimus egasimus merged commit 34f757f into master Aug 5, 2023
8 checks passed
@egasimus egasimus deleted the feat/schema-tool branch August 5, 2023 14:10
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.

None yet

1 participant