id:{type:'ID'}在羽毛加上由在官方jsonschema中定义的cli创建的featherjs模型中生成?

问题描述 投票:0回答:1

我查看了json模式文档和示例,但没有看到生成器在json模型中创建的ID类型。羽毛示例 - 加上cli jsonschema

  properties: {
    // !code: schema_properties
    id: { type: 'ID' },
    email: {},

在jsonschema官方docs示例中,id被定义为

"properties": {
      "id": {
        "type": ["string", "integer"],
jsonschema feathersjs
1个回答
1
投票

JSON Schema不允许这样做。

根据https://github.com/feathers-plus/generator-feathers-plus/tree/master/docs/json-schema的文件

Feathers模型基于JSON模式。

这告诉我他们的模型不是JSON Schema。

如果你想知道原因,你应该在他们的github回购上提出一个问题。

© www.soinside.com 2019 - 2024. All rights reserved.