Skip to content

docs(sdk): add generated reference for @obolnetwork/obol-sdk v3 - #656

Open
OisinKyne wants to merge 2 commits into
mainfrom
docs/sdk-v3-reference
Open

OisinKyne wants to merge 2 commits into
mainfrom
docs/sdk-v3-reference

Conversation

@OisinKyne

Copy link
Copy Markdown
Contributor

Adds docs/sdk-v3 under /next/sdk/v3: v3 at a glance, a lifecycle map, the API reference by client namespace, error codes, warnings and findings, a 2.x to 3.x map and a page for AI agents. Pages are generated from the SDK source and spec by scripts/generate-sdk-v3-reference.sh, which also type-checks every sample. Generated from obol-sdk feat/sdk-v3-package at 080fa55 (3.0.0-rc.12).

The 2.x SDK docs are unchanged; one sidebar link points to v3.

Wait for v3 to release before merging

Summary

Details

ticket:

…ase candidate)

Adds docs/sdk-v3 under /next/sdk/v3: v3 at a glance, a lifecycle map,
the API reference by client namespace, error codes, warnings and
findings, a 2.x to 3.x map and a page for AI agents. Pages are generated
from the SDK source and spec by scripts/generate-sdk-v3-reference.sh,
which also type-checks every sample. Generated from obol-sdk
feat/sdk-v3-package at 080fa55 (3.0.0-rc.12).

The 2.x SDK docs are unchanged; one sidebar link points to v3.
Comment thread scripts/sdk-v3/generate.mjs Fixed
Comment thread scripts/sdk-v3/generate.mjs Fixed
The quality gate failed on reliability: two bugs in generate.mjs (a
predicate passed straight to .filter(), and a conditional with identical
branches). Both are fixed, along with the maintainability findings in the
generator tooling. Generated pages are byte-identical.

- Replace the regexes Sonar reports as super-linear with single-pass
  scanners (headingOf, isTableSeparator, replaceLinkTags, mapCodeSpans,
  attributedOperation, beforeParen) or anchored single-class patterns.
- Format signatures and type declarations with prettier up front, so the
  page renderers are synchronous and no longer await in loops.
- Split the page renderers into small helpers; remove nested ternaries,
  nested template literals, dead variables and void statements; use
  replaceAll, startsWith/endsWith, optional chaining and at().
- sdk-v3.css: drop two !important by outranking `.markdown li + li`.
- Add .sonarcloud.properties excluding generated output
  (docs/sdk-v3/reference, docs/sdk-v3/_generated, sidebars-sdk-v3.mjs)
  and the example snippets (scripts/sdk-v3/examples) from analysis.
@sonarqubecloud

Copy link
Copy Markdown


/** The row of one field of an object parameter. */
function paramFieldRow(p, f, file) {
const inherited = f.declaredIn && f.declaredIn !== p.type.replace(/<.*/, '');

This branch has not been deployed

No deployments
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.

2 participants