Exemplo n.º 1
0
        public JsonSchemaProperty?Visit(IArrayField field)
        {
            var item = Builder.Object();

            foreach (var nestedField in field.Fields.ForApi(withHiddenFields))
            {
                var childProperty = nestedField.Accept(this);

                if (childProperty != null)
                {
                    childProperty.Description = nestedField.RawProperties.Hints;
                    childProperty.IsRequired  = nestedField.RawProperties.IsRequired;

                    item.Properties.Add(nestedField.Name, childProperty);
                }
            }

            return(Builder.ArrayProperty(item));
        }
Exemplo n.º 2
0
        public JsonSchemaProperty?Visit(IField <AssetsFieldProperties> field)
        {
            var item = schemaResolver("AssetItem", Builder.Guid());

            return(Builder.ArrayProperty(item));
        }
Exemplo n.º 3
0
        public JsonSchemaProperty?Visit(IField <TagsFieldProperties> field)
        {
            var item = schemaResolver("ReferenceItem", Builder.String());

            return(Builder.ArrayProperty(item));
        }
Exemplo n.º 4
0
        public JsonProperty Visit(IField <ReferencesFieldProperties> field)
        {
            var item = schemaResolver("ReferenceItem", Builder.Guid());

            return(Builder.ArrayProperty(item));
        }