Skip to content

Commit

Permalink
bugfix: only correct schema option if both type is openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
cdxker committed Oct 10, 2024
1 parent 4e1ac82 commit 556bfc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontends/dashboard/src/pages/dataset/CrawlingSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ const defaultCrawlOptions: CrawlOptions = {
const normalizeOpenAPIOptions = (
options: CrawlOpenAPIOptions | null | undefined,
) => {
if (options) {
if (options && options.type == "openapi") {
if (options.openapi_schema_url === "") {
return null;
}
if (!options.openapi_tag && !options.openapi_schema_url) {
return null;
}
return options;
} else if (options && options.type == "shopify") {
return options;
}
return null;
};
Expand Down

0 comments on commit 556bfc1

Please sign in to comment.