Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Define Artifact and Validator contracts #2

Merged
merged 1 commit into from
May 3, 2022

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.

None yet

2 participants