Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

Need to refine the APIs' parameters. #347

@zongzw

Description

@zongzw

If we define the API like this:

  @get(prefix + '/services', {
    responses: {
      '200': Schema.response(Service, 'Successfully retrieve Service resource'),
    },
  })
  async find(
    @param.query.object('filter', getFilterSchemaFor(Service)) filter?: Filter,
  ): Promise<CollectionResponse> {
    let data = await this.serviceRepository.find(filter, {
      tenantId: await this.tenantId,
    });
    return new CollectionResponse(Service, data);
  }

It may be hard for user to pass object-type query parameters, it should be refined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions