daffl Github contribution chart
daffl Github Stats
daffl Most Used Languages

Activity

04 Oct 2022

Daffl

Add Typebox integration

Pushed On 04 Oct 2022 at 07:26:48
Merge

Daffl

feat(schema): Make schemas validation library independent and add TypeBox option

This pull request allows for the schema validation hooks to take a generic validator function. This was the only change necessary to allow making resolvers schema validation library independent. This means resolvers and validation hooks can also be used with other libraries like TypeBox (which will be available as an option, see https://github.com/feathersjs/feathers/pull/2762) or Yup.

This also updates the CLI to create schemas without the now unnecessary schema wrapper and with separate hooks for validation and resolving. It also significantly reduces the generated code for new services and only generates a name.service.ts (with class, hooks and registration) and name.schema.ts file (with schemas and resolvers) as discussed in #2760 and with @marshallswain.

Forked On 04 Oct 2022 at 03:07:09

Daffl

The service name is mostly for variable naming. So it'll be `UserData` `User`, `userResolver` etc. instead of the plural `UsersData`, `usersResolver`.
On 04 Oct 2022 at 03:07:09

Daffl

feat(schema): Make schemas validation library independent and add TypeBox option

This pull request allows for the schema validation hooks to take a generic validator function. This was the only change necessary to allow making resolvers schema validation library independent. This means resolvers and validation hooks can also be used with other libraries like TypeBox (which will be available as an option, see https://github.com/feathersjs/feathers/pull/2762) or Yup.

This also updates the CLI to create schemas without the now unnecessary schema wrapper and with separate hooks for validation and resolving. It also significantly reduces the generated code for new services and only generates a name.service.ts (with class, hooks and registration) and name.schema.ts file (with schemas and resolvers) as discussed in #2760 and with @marshallswain.

Merged On 04 Oct 2022 at 03:07:10

Daffl

Commented On 04 Oct 2022 at 03:07:10
Merge

Daffl

feat(schema): Make schemas validation library independent and add TypeBox option

This pull request allows for the schema validation hooks to take a generic validator function. This was the only change necessary to allow making resolvers schema validation library independent. This means resolvers and validation hooks can also be used with other libraries like TypeBox (which will be available as an option, see https://github.com/feathersjs/feathers/pull/2762) or Yup.

This also updates the CLI to create schemas without the now unnecessary schema wrapper and with separate hooks for validation and resolving. It also significantly reduces the generated code for new services and only generates a name.service.ts (with class, hooks and registration) and name.schema.ts file (with schemas and resolvers) as discussed in #2760 and with @marshallswain.

Forked On 04 Oct 2022 at 03:06:22

Daffl

Yes. Should we leave it out and document it instead? I was already thinking of keeping it out. I think I'll have to add the formats still though.
On 04 Oct 2022 at 03:06:22

Daffl

feat(schema): Make schemas validation library independent and add TypeBox option

This pull request allows for the schema validation hooks to take a generic validator function. This was the only change necessary to allow making resolvers schema validation library independent. This means resolvers and validation hooks can also be used with other libraries like TypeBox (which will be available as an option, see https://github.com/feathersjs/feathers/pull/2762) or Yup.

This also updates the CLI to create schemas without the now unnecessary schema wrapper and with separate hooks for validation and resolving. It also significantly reduces the generated code for new services and only generates a name.service.ts (with class, hooks and registration) and name.schema.ts file (with schemas and resolvers) as discussed in #2760 and with @marshallswain.

Merged On 04 Oct 2022 at 03:06:22

Daffl

Commented On 04 Oct 2022 at 03:06:22
Merge

Daffl

feat(schema): Make schemas validation library independent and add TypeBox option

This pull request allows for the schema validation hooks to take a generic validator function. This was the only change necessary to allow making resolvers schema validation library independent. This means resolvers and validation hooks can also be used with other libraries like TypeBox (which will be available as an option, see https://github.com/feathersjs/feathers/pull/2762) or Yup.

This also updates the CLI to create schemas without the now unnecessary schema wrapper and with separate hooks for validation and resolving. It also significantly reduces the generated code for new services and only generates a name.service.ts (with class, hooks and registration) and name.schema.ts file (with schemas and resolvers) as discussed in #2760 and with @marshallswain.

Forked On 04 Oct 2022 at 03:04:53

Daffl

I think we might have to add more comments in the generated files in general. Maybe have a flag to omit them?
On 04 Oct 2022 at 03:04:53

Daffl

feat(schema): Make schemas validation library independent and add TypeBox option

This pull request allows for the schema validation hooks to take a generic validator function. This was the only change necessary to allow making resolvers schema validation library independent. This means resolvers and validation hooks can also be used with other libraries like TypeBox (which will be available as an option, see https://github.com/feathersjs/feathers/pull/2762) or Yup.

This also updates the CLI to create schemas without the now unnecessary schema wrapper and with separate hooks for validation and resolving. It also significantly reduces the generated code for new services and only generates a name.service.ts (with class, hooks and registration) and name.schema.ts file (with schemas and resolvers) as discussed in #2760 and with @marshallswain.

Merged On 04 Oct 2022 at 03:04:54

Daffl

Commented On 04 Oct 2022 at 03:04:54
Merge

Daffl

feat(schema): Make schemas validation library independent and add TypeBox option

This pull request allows for the schema validation hooks to take a generic validator function. This was the only change necessary to allow making resolvers schema validation library independent. This means resolvers and validation hooks can also be used with other libraries like TypeBox (which will be available as an option, see https://github.com/feathersjs/feathers/pull/2762) or Yup.

This also updates the CLI to create schemas without the now unnecessary schema wrapper and with separate hooks for validation and resolving. It also significantly reduces the generated code for new services and only generates a name.service.ts (with class, hooks and registration) and name.schema.ts file (with schemas and resolvers) as discussed in #2760 and with @marshallswain.

Forked On 04 Oct 2022 at 03:03:53

Daffl

It *is* also used as the external response data.
On 04 Oct 2022 at 03:03:53

Daffl

feat(schema): Make schemas validation library independent and add TypeBox option

This pull request allows for the schema validation hooks to take a generic validator function. This was the only change necessary to allow making resolvers schema validation library independent. This means resolvers and validation hooks can also be used with other libraries like TypeBox (which will be available as an option, see https://github.com/feathersjs/feathers/pull/2762) or Yup.

This also updates the CLI to create schemas without the now unnecessary schema wrapper and with separate hooks for validation and resolving. It also significantly reduces the generated code for new services and only generates a name.service.ts (with class, hooks and registration) and name.schema.ts file (with schemas and resolvers) as discussed in #2760 and with @marshallswain.

Merged On 04 Oct 2022 at 03:03:53

Daffl

Commented On 04 Oct 2022 at 03:03:53

Daffl

Add some minor prompt validatoin

Pushed On 04 Oct 2022 at 06:00:15

Daffl

Allow to generate services without schema

Pushed On 04 Oct 2022 at 05:44:48

Daffl

Improve schema and resolver usage

Pushed On 04 Oct 2022 at 12:43:23

Daffl

Fix Express app configuration import

Pushed On 03 Oct 2022 at 11:55:40

Daffl

feat(schema): Make schemas validation library independent and update CLI generator

Created On 03 Oct 2022 at 11:48:59
Create Branch
Daffl In feathersjs/feathers Create Branchschema-validator-independent

Daffl

The API and real-time application framework

On 03 Oct 2022 at 11:43:20

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 03:05:39

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 03:04:50

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 02:08:41

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 01:55:06

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 01:48:18

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 01:28:10

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 01:26:35

Daffl

fix(dependencies): Update all dependencies

Created On 01 Oct 2022 at 01:04:49

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 12:55:14

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 12:45:41
Pull Request

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 12:29:35

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 12:13:36

Daffl

chore(dependencies): Update all dependencies

Created On 01 Oct 2022 at 12:10:23
Issue Comment

Daffl

unuse() does not work for routes with parameters

Steps to reproduce

await app.unuse('path/:id')
app.use('path/:id', ...) 

Expected behavior

Should unregister like this:

await app.unuse('path')
app.use('path', ...) 

Actual behavior

Throws error:

Error: Path path/:id already exists 

System configuration

Feathers Dove: Built from source

https://github.com/feathersjs/feathers/pull/2756

Forked On 30 Sep 2022 at 03:40:13

Daffl

This is an interesting usecase. There might be a way to extend the oAuth provider service for this and allowing to override the configuration dynamically e.g. through params.

Commented On 30 Sep 2022 at 03:40:13
Issue Comment

Daffl

unuse() does not work for routes with parameters

Steps to reproduce

await app.unuse('path/:id')
app.use('path/:id', ...) 

Expected behavior

Should unregister like this:

await app.unuse('path')
app.use('path', ...) 

Actual behavior

Throws error:

Error: Path path/:id already exists 

System configuration

Feathers Dove: Built from source

https://github.com/feathersjs/feathers/pull/2756

Forked On 29 Sep 2022 at 03:54:50

Daffl

What is the rest of your setup? This test is passing for me:

 it('can unregister a service (#2035, #2767)', async () => {
    app.use('service/:id', {
      async get(id: string | number) {
        return { id }
      }
    })

    assert.strictEqual(app.lookup('service/123').service, app.service('service/:id'))

    app.unuse('service/:id')

    assert.strictEqual(app.lookup('service/123'), null)

    app.use('service/:id', {
      async get(id: string | number) {
        return { id }
      }
    })
  }) 

Commented On 29 Sep 2022 at 03:54:50