Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Diva Schemaを渡してDiva::Modelを定義するやつ
Diva::Model(
fields: [
{ name: "fields",
constraint: { array: { type: "diva://object.type/field" } }
},
{ name: "required",
constraint: { type: "diva://atomic.type/boolean" }
},
{ name: "uri",
constraint: { type: "diva://atomic.type/uri" }
}
],
required: %w[fields uri],
uri: "diva://object.type/model"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment