Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fi
echo "Cleaning ./$DOCS_PATH/generated..."
rm -rf ./$DOCS_PATH/generated

COMPILE_DOCS="yarn generate-docs --overridePath ./$DOCS_PATH/typeOverride.json --input ./$SRC_PATH --output ./$DOCS_PATH/generated"
COMPILE_DOCS="yarn generate-docs --strictInput --overridePath ./$DOCS_PATH/typeOverride.json --input ./$SRC_PATH --output ./$DOCS_PATH/generated"

# Copy all .d.ts files in components directory to .ts files so they can be picked up by the generate-docs tool
echo "Copying .d.ts files to temporary .ts files..."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
{
"ValidationError": {
"src/shared.ts": {
"filePath": "src/shared.ts",
"src/surfaces/checkout/api/shared.ts": {
"filePath": "src/surfaces/checkout/api/shared.ts",
"name": "ValidationError",
"description": "A validation error object that is returned when an operation fails.",
"description": "",
"isPublicDocs": true,
"members": [
{
"filePath": "src/shared.ts",
"syntaxKind": "PropertySignature",
"name": "code",
"value": "string",
"description": "A code identifier for the error."
},
{
"filePath": "src/shared.ts",
"syntaxKind": "PropertySignature",
"name": "issues",
"value": "{ message: string; path: string[]; }[]",
"description": "Field-level validation issues",
"isOptional": true
},
{
"filePath": "src/shared.ts",
"filePath": "src/surfaces/checkout/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "message",
"value": "string",
"description": "A message describing the error."
"description": "The error message to display to the buyer. Use this to explain what went wrong and how to fix it."
},
{
"filePath": "src/shared.ts",
"filePath": "src/surfaces/checkout/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
"value": "'error'",
"description": ""
"name": "target",
"value": "string",
"description": "The checkout UI field that the error is associated with. When provided, checkout highlights the matching field so the buyer knows where to fix the issue. The value is `undefined` if the error isn't tied to a specific field.",
"isOptional": true,
"examples": [
{
"title": "Example",
"description": "",
"tabs": [
{
"code": "'$.cart.deliveryGroups[0].deliveryAddress.countryCode'\n\nSee the [supported targets](/docs/api/functions/reference/cart-checkout-validation/graphql#supported-targets)\nfor more information.",
"title": "Example"
}
]
}
]
}
],
"value": "interface ValidationError {\n type: 'error';\n /**\n * A message describing the error.\n */\n message: string;\n /**\n * A code identifier for the error.\n */\n code: string;\n /**\n * Field-level validation issues\n */\n issues?: {\n message: string;\n path: string[];\n }[];\n}"
"value": "export interface ValidationError {\n /**\n * The error message to display to the buyer. Use this to explain what\n * went wrong and how to fix it.\n */\n message: string;\n /**\n * The checkout UI field that the error is associated with. When provided,\n * checkout highlights the matching field so the buyer knows where to fix\n * the issue. The value is `undefined` if the error isn't tied to a\n * specific field.\n *\n * @example '$.cart.deliveryGroups[0].deliveryAddress.countryCode'\n *\n * See the [supported targets](/docs/api/functions/reference/cart-checkout-validation/graphql#supported-targets)\n * for more information.\n */\n target?: string;\n}"
}
},
"Country": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const generateExtensionsDocs = async () => {

const overridePath = `./${docsRelativePath}/typeOverride.json`;
await execAsync(
`yarn generate-docs --overridePath ${overridePath} --input ./${srcRelativePath} ./${checkoutComponentsRelativePath} --output ./${outputDir}`,
`yarn generate-docs --strictInput --overridePath ${overridePath} --input ./${srcRelativePath} ./${checkoutComponentsRelativePath} --output ./${outputDir}`,
{maxBuffer},
);

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"@preact/signals": "^2.3.x",
"@quilted/react-testing": "^0.6.11",
"@remote-ui/async-subscription": "^2.1.16",
"@shopify/generate-docs": "1.2.2",
"@shopify/generate-docs": "1.3.0",
"preact": "^10.10.x",
"publint": "^0.3.23",
"typescript": "^4.9.0"
Expand Down
Loading
Loading