Skip to content

[FEAT] fetch增加响应字段校验功能 #87

Open
@hugzh

Description

@hugzh

Description

wxa-core:

  1. fetch函数增加response的格式校验能力,允许开发者对接口响应字段的完整性和数据格式进行自定义校验,类似json Schema的模式。

  2. 校验不通过时在不中断运行逻辑的情况下进行warn提示

fetch('api', {}, {$resSchema: { name: { required:true, type: 'string' } }, 'POST' )

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions