Skip to content

Commit

Permalink
Export schema on its own
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasavila00 committed May 14, 2024
1 parent 5eb9937 commit 1a0c730
Show file tree
Hide file tree
Showing 28 changed files with 521 additions and 1,012 deletions.
3 changes: 0 additions & 3 deletions e2e-tests/bug-rust-repro/src/generated/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* eslint-disable */


import jsonSchema from "./schema.js";
import {printErrors} from '@beff/client';
import {z} from 'zod';
import validatorsMod from "./validators.js"; const { decodeObject, decodeArray, decodeString, decodeNumber, decodeCodec, decodeStringWithFormat, decodeAnyOf, decodeAllOf, decodeBoolean, decodeAny, decodeTuple, decodeNull, decodeConst, registerCustomFormatter, validators, c } = validatorsMod;
Expand Down Expand Up @@ -72,8 +71,6 @@ function buildParsers(args) {
parse,
safeParse,
zod,

jsonSchema: jsonSchema[k]
};
});
return decoders;
Expand Down
9 changes: 9 additions & 0 deletions e2e-tests/bug-rust-repro/src/generated/schema.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable */

import { BuildSchemaFunction } from "@beff/cli";

declare const _exports: {
buildSchemas: BuildSchemaFunction
};

export default _exports;
1 change: 1 addition & 0 deletions e2e-tests/standalone-parser/beff.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parser": "./src/parser.ts",
"schema": "./src/schema.ts",
"outputDir": "./src/generated",
"customFormats": [
{
Expand Down
3 changes: 0 additions & 3 deletions e2e-tests/standalone-parser/src/generated/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* eslint-disable */


import jsonSchema from "./schema.js";
import {printErrors} from '@beff/client';
import {z} from 'zod';
import validatorsMod from "./validators.js"; const { decodeObject, decodeArray, decodeString, decodeNumber, decodeCodec, decodeStringWithFormat, decodeAnyOf, decodeAllOf, decodeBoolean, decodeAny, decodeTuple, decodeNull, decodeConst, registerCustomFormatter, validators, c } = validatorsMod;
Expand Down Expand Up @@ -171,8 +170,6 @@ function buildParsers(args) {
parse,
safeParse,
zod,

jsonSchema: jsonSchema[k]
};
});
return decoders;
Expand Down
9 changes: 9 additions & 0 deletions e2e-tests/standalone-parser/src/generated/schema.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable */

import { BuildSchemaFunction } from "@beff/cli";

declare const _exports: {
buildSchemas: BuildSchemaFunction
};

export default _exports;
Loading

0 comments on commit 1a0c730

Please sign in to comment.