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 2f6b871
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontends/dashboard/src/pages/dataset/CrawlingSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ 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 {
return options
}
return null;
};

export const CrawlingSettings = () => {
Expand Down

0 comments on commit 2f6b871

Please sign in to comment.