载入中...
搜索中...
未找到
eve::schema::SchemaNode结构体 参考

Recursive node in the deliberately small Eve Schema language. 更多...

#include <SchemaTypes.h>

类 eve::schema::SchemaNode 继承关系图:
eve::schema::FieldDefinition

Public 属性

ValueType type = ValueType::Any
 The value kind accepted by this node.
 
ValueType elementType = ValueType::Any
 Legacy homogeneous array constraint retained for compatibility.
 
std::string ref
 Whole-schema reference, for example combat:damage.
 
int refVersion = 0
 Exact referenced schema version; zero means the highest version.
 
std::shared_ptr< const SchemaDefinition > objectSchema
 Inline object shape for an object node.
 
std::shared_ptr< const SchemaNode > itemSchema
 Recursive schema for every array item.
 
std::vector< SchemaNode > variants
 Union alternatives; at least one alternative is required.
 
std::string discriminator
 Object member used to select a union alternative.
 
std::map< std::string, std::string > discriminatorMapping
 Discriminator value to ref or zero-based variant index.
 
std::vector< std::string > enumValues
 String enum values accepted by this node.
 
std::optional< double > minimum
 
std::optional< double > maximum
 
std::optional< int > minLength
 
std::optional< int > maxLength
 
std::optional< int > minItems
 
std::optional< int > maxItems
 

详细描述

Recursive node in the deliberately small Eve Schema language.

Eve Schema is a data-validation and tooling contract, not a full JSON Schema implementation. It supports JSON scalar/object/array kinds, bounded scalar constraints, one array item node, whole-schema refs, and a discriminator-aware union. It intentionally does not implement arbitrary JSON Pointer fragments, patternProperties, conditionals, tuple arrays, unevaluatedProperties, or arbitrary keyword composition.

在文件 SchemaTypes.h 第 47 行定义.

类成员变量说明

◆ discriminator

std::string eve::schema::SchemaNode::discriminator

Object member used to select a union alternative.

在文件 SchemaTypes.h 第 63 行定义.

◆ discriminatorMapping

std::map<std::string, std::string> eve::schema::SchemaNode::discriminatorMapping

Discriminator value to ref or zero-based variant index.

在文件 SchemaTypes.h 第 65 行定义.

◆ elementType

ValueType eve::schema::SchemaNode::elementType = ValueType::Any

Legacy homogeneous array constraint retained for compatibility.

在文件 SchemaTypes.h 第 51 行定义.

◆ enumValues

std::vector<std::string> eve::schema::SchemaNode::enumValues

String enum values accepted by this node.

在文件 SchemaTypes.h 第 67 行定义.

◆ itemSchema

std::shared_ptr<const SchemaNode> eve::schema::SchemaNode::itemSchema

Recursive schema for every array item.

在文件 SchemaTypes.h 第 59 行定义.

◆ maximum

std::optional<double> eve::schema::SchemaNode::maximum

在文件 SchemaTypes.h 第 69 行定义.

◆ maxItems

std::optional<int> eve::schema::SchemaNode::maxItems

在文件 SchemaTypes.h 第 73 行定义.

◆ maxLength

std::optional<int> eve::schema::SchemaNode::maxLength

在文件 SchemaTypes.h 第 71 行定义.

◆ minimum

std::optional<double> eve::schema::SchemaNode::minimum

在文件 SchemaTypes.h 第 68 行定义.

◆ minItems

std::optional<int> eve::schema::SchemaNode::minItems

在文件 SchemaTypes.h 第 72 行定义.

◆ minLength

std::optional<int> eve::schema::SchemaNode::minLength

在文件 SchemaTypes.h 第 70 行定义.

◆ objectSchema

std::shared_ptr<const SchemaDefinition> eve::schema::SchemaNode::objectSchema

Inline object shape for an object node.

在文件 SchemaTypes.h 第 57 行定义.

◆ ref

std::string eve::schema::SchemaNode::ref

Whole-schema reference, for example combat:damage.

在文件 SchemaTypes.h 第 53 行定义.

◆ refVersion

int eve::schema::SchemaNode::refVersion = 0

Exact referenced schema version; zero means the highest version.

在文件 SchemaTypes.h 第 55 行定义.

◆ type

ValueType eve::schema::SchemaNode::type = ValueType::Any

The value kind accepted by this node.

在文件 SchemaTypes.h 第 49 行定义.

◆ variants

std::vector<SchemaNode> eve::schema::SchemaNode::variants

Union alternatives; at least one alternative is required.

在文件 SchemaTypes.h 第 61 行定义.


该结构体的文档由以下文件生成: