Skip to content

Conversation

@kokokuo
Copy link
Contributor

@kokokuo kokokuo commented May 3, 2022

Description

Define the contract of artifact type and IValidator interface for extending our built-in other validator and make the client could use it.

The artifact type from schema.yaml format:

# The name used for graphQL
name: user
url: /user/:id
request:
  parameters:
    id:
      in: query # path / query / header
      description: user id
      validators:
        - name: Date
          args:
            format: 'yyyy-MM-dd'
        - name: required
error:
  - code: Forbidden
    message: 'You are not allowed to access this resource'

@kokokuo kokokuo requested a review from oscar60310 May 3, 2022 08:28
@kokokuo kokokuo force-pushed the feature/core/define-artifact-contract branch from d2d296b to ba9d4f8 Compare May 3, 2022 08:29
Copy link
Contributor

@oscar60310 oscar60310 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@oscar60310 oscar60310 merged commit 698eb2f into main May 3, 2022
@oscar60310 oscar60310 deleted the feature/core/define-artifact-contract branch May 3, 2022 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants