Rest 如何为json ld中的资源指定支持的http操作?
我是JSON-LD新手,我想知道是否有任何方法可以在不使用Hydra的supportedOperation或supportedProperty的情况下指定JSON-LD中支持的资源操作。 有没有办法指定上下文,例如:Rest 如何为json ld中的资源指定支持的http操作?,rest,json-ld,http-method,hydra-core,Rest,Json Ld,Http Method,Hydra Core,我是JSON-LD新手,我想知道是否有任何方法可以在不使用Hydra的supportedOperation或supportedProperty的情况下指定JSON-LD中支持的资源操作。 有没有办法指定上下文,例如: { "@context" : { "@vocab" : "http://www.schema.org/", "data" : "object", "id" :"Number", "name" : "alternateName",
{
"@context" : {
"@vocab" : "http://www.schema.org/",
"data" : "object",
"id" :"Number",
"name" : "alternateName",
"full_name" : "name",
"links" : {
"@id" : "URL",
"@type" : "collection"
},
"href" : "URL",
"rel" : "relatedTo",
"operation" : [
{
"href" : "http://example.com/resources/1/anotherresources/2",
"method" : "POST",
"expects" :[parameter list],
"required" : [list of mandatory arguments],
"fixed value" : [list of argument with fixed value for a resource]
}
]
}
任何指导都会有很大帮助。不,您不能在上下文中指定它。但是,您可以做的是将操作绑定到Hydra
API文档中的属性。否,您不能在上下文中指定它。但是,您可以做的是将操作绑定到HydraApiDocumentation
()和中的属性