Skip to content

Commit

Permalink
feat(schema): PDE-5719 split FieldSchema into InputFieldSchema, Outpu…
Browse files Browse the repository at this point in the history
…tFieldSchema, and AuthFieldSchema (#957)

* first attempt: split FieldSchema

* PDE-5719 address PR comments

* PDE-5719 address commented out lines

* PDE-5719 address commented out lines

* PDE-5719 clean up

* PDE-5719 clean up

* rename to AuthFieldSchema

* PR suggestions: remove cleanErrors addition

* PR suggestions: add examples and anti-examples

* fix description

* remove FieldsSchema and DynamicFieldsSchema

* add unit tests

* update unit test

* Update packages/schema/lib/schemas/AuthFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldsSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldsSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldsSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldsSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldsSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* run yarn build

* PR suggestion: move isSafe check as a functional-contsraint

* update test

* Update packages/schema/test/index.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/test/index.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/test/index.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/utils/makeValidator.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/functional-constraints/AuthFieldisSafe.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/functional-constraints/AuthFieldisSafe.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/functional-constraints/AuthFieldisSafe.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/functional-constraints/AuthFieldisSafe.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/functional-constraints/AuthFieldisSafe.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/functional-constraints/AuthFieldisSafe.js

Co-authored-by: Kola Erinoso <[email protected]>

* update FORBIDDEN_KEYS to match secret scrubber

* PR suggestions: tailor fields to not inherit from FieldSchema

* run yarn build

* PR suggestions: remove uneeded fields and fix tests

* PR suggestion:rename to isNotSecret

* PDE-5719 add helpText back to inputField

* update type enums for better fit

* apply PR suggestions

* apply PR suggestions

* remove copy from auth types

* add default back to input and output schema

* update docs

* apply PR suggestions

* apply PR suggestions

* PR suggestion: use common fields and update schemas

* Update packages/schema/lib/functional-constraints/AuthFieldisSafe.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/OutputFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/test/index.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/FieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/AuthFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Update packages/schema/lib/schemas/InputFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

* Split FieldSchema into AuthFieldSchema, InputFieldSchema, OutputFieldSchema

* add examples/anti-examples back for FieldSchema

* Update packages/schema/lib/schemas/AuthFieldSchema.js

Co-authored-by: Kola Erinoso <[email protected]>

---------

Co-authored-by: Kola Erinoso <[email protected]>
  • Loading branch information
Natay and kola-er authored Feb 4, 2025
1 parent b13bd0c commit a6f4867
Show file tree
Hide file tree
Showing 20 changed files with 1,721 additions and 770 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/tests/utils/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('build (runs slowly)', function () {
smartPaths.filter((p) => p.endsWith('.ts')).length.should.equal(0);
smartPaths.should.not.containEql('tsconfig.json');

smartPaths.length.should.be.within(200, 301);
smartPaths.length.should.be.within(200, 304);
});

it('should list all the files', () => {
Expand Down
Loading

0 comments on commit a6f4867

Please sign in to comment.