Skip to content

docs(dataset): fix V2 --type examples to match CLI validation (#51) - #57

Open
linhongyu510 wants to merge 1 commit into
volcengine:mainfrom
linhongyu510:fix/v2-dataset-type-docs-51
Open

docs(dataset): fix V2 --type examples to match CLI validation (#51)#57
linhongyu510 wants to merge 1 commit into
volcengine:mainfrom
linhongyu510:fix/v2-dataset-type-docs-51

Conversation

@linhongyu510

Copy link
Copy Markdown

Summary

Fixes #51.

The V2 dataset command family (vs dataset create / ingest / infer-schema) validates --type via parseDatasetTypeV2Value, which only accepts user_event and multi_modal (plus their aliases user-event, multi-modal, multimodal). However, docs, embedded help text, oclif command examples, and acceptance fixtures still advertised legacy/illegal values such as item, video, document, event, behavior, image_text, and the <...|user-event|document> placeholder. Following the documented examples verbatim causes the CLI to reject the command with Use user_event|multi_modal.

Changes

  • docs/COMMANDS.md: dataset create --type placeholder -> <user_event|multi_modal>.
  • src/core/root-help.ts: Quick-start infer-schema example --type item -> multi_modal.
  • src/app/product-commands.ts: dataset create/ingest/infer-schema help + EXAMPLES now use multi_modal (kept vs dataset list --type item filter and V1 vs item ... --type item|video, which use different validation paths).
  • src/commands/dataset/{create,ingest,infer-schema}.ts: oclif examples -> multi_modal.
  • scripts/fixtures/v2-onboarding/dataset-create.json, scripts/suites/v2-onboarding.cjs, scripts/run-acceptance.cjs: fixtures/tests updated to valid types; the stale rejects-multi-modal negatives are repurposed into legacy-type (item) rejection tests aligned with current validation, keeping the document rejection.

Verification

Confirmed against parseDatasetTypeV2Value (src/app/product-commands.ts): INFER_SCHEMA_DATASET_TYPES and CREATE_DATASET_TYPES are both [user_event, multi_modal]; passing item/video/document throws. The v2-onboarding acceptance dataset-type tests now pass (remaining render-schema failures are pre-existing and unrelated to this change).

The V2 dataset command family (vs dataset create / ingest / infer-schema)
validates --type via parseDatasetTypeV2Value, which only accepts
user_event and multi_modal (plus their aliases). Numerous docs, embedded
help text, oclif command examples, and acceptance fixtures/tests still
showed legacy/illegal values such as item, video, document, event,
behavior, image_text and the <...|user-event|document> placeholder, all
of which the CLI now rejects with "Use user_event|multi_modal".

Changes:
- docs/COMMANDS.md: dataset create / schema check --type placeholders ->
  <user_event|multi_modal>.
- src/core/root-help.ts: V2 onboarding infer-schema example --type item ->
  multi_modal.
- src/app/product-commands.ts: dataset create/ingest/infer-schema help and
  EXAMPLES blocks now use multi_modal (kept vs dataset list --type item
  filter and vs item ... --type item|video which use different validation).
- src/commands/dataset/{create,ingest,infer-schema}.ts: oclif examples ->
  multi_modal.
- scripts/fixtures/v2-onboarding/dataset-create.json: Type item ->
  multi_modal.
- scripts/suites/v2-onboarding.cjs: pipeline datasetType item/video ->
  multi_modal.
- scripts/run-acceptance.cjs: update mock/dry-run tests to multi_modal and
  repurpose the stale "rejects multi_modal" negatives into legacy-type
  rejection tests aligned with current validation; keep the document
  rejection negative.

The v2-onboarding acceptance suite dataset-type tests now pass
(remaining render-schema failures are pre-existing and unrelated).

Signed-off-by: linhongyu510 <linhongyu510@users.noreply.github.com>
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.

V2 dataset type examples are inconsistent with current CLI validation

1 participant