Skip to content

Commit

Permalink
dist: update
Browse files Browse the repository at this point in the history
  • Loading branch information
sagold committed Dec 2, 2024
1 parent 1fdfdb1 commit 63f9fe0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/jsonSchemaLibrary.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/lib/config/settings.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
declare const _default: {
DECLARATOR_ONEOF: string;
/** set to false to not set __oneOfIndex on returned schema */
EXPOSE_ONE_OF_INDEX: boolean;
GET_TEMPLATE_RECURSION_LIMIT: number;
propertyBlacklist: string[];
templateDefaultOptions: {
Expand Down
2 changes: 2 additions & 0 deletions dist/module/lib/config/settings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export default {
DECLARATOR_ONEOF: "oneOfProperty",
/** set to false to not set __oneOfIndex on returned schema */
EXPOSE_ONE_OF_INDEX: true,
GET_TEMPLATE_RECURSION_LIMIT: 1,
propertyBlacklist: ["_id"],
templateDefaultOptions: {
Expand Down
4 changes: 2 additions & 2 deletions dist/module/lib/features/oneOf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import settings from "../config/settings";
import { errorOrPromise } from "../utils/filter";
import { isJsonError } from "../types";
import { isObject } from "../utils/isObject";
const { DECLARATOR_ONEOF } = settings;
const { DECLARATOR_ONEOF, EXPOSE_ONE_OF_INDEX } = settings;
function setOneOfOrigin(schema, index) {
if (isObject(schema)) {
if (EXPOSE_ONE_OF_INDEX && isObject(schema)) {
schema.__oneOfIndex = index;
}
}
Expand Down

0 comments on commit 63f9fe0

Please sign in to comment.