Hi Matt,
Am 17.07.2014 02:12, schrieb Matt Bonneau:
> Hi Tobias,
>
> I do think discovery and description are great additions to the spec.
>
> With your example, would the callee provide this information to the
> dealer when it registers the call?
No, besides wamp.reflect.describe to query for metadata, there is
wamp.reflect.define to set metadata on a URI.
That procedure simply takes an URI and a config object like
{
"type": "procedure",
"title": "Create Product",
"description": "Create a new product in the store catalog."
"kwargs": {
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for a product",
"type": "integer"
},
"name": {
"description": "Name of the product",
"type": "string"
},
"price": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
}
},
"required": ["id", "name", "price"]
}
}
This procedure only takes keyword arguments, and the "kwargs" property
is a JSON-Schema object.
So the metadata stuff essentially is a service serparate in principle.
Requirements like all procedures need to be first defined before they
can be registered, or enforcing any calls to follow schemas etc are
router implementation specific.
What the spec will describe are the metadata WAMP API and the schema
language above.
Cheers,
/Tobias
> "../api.md <
http://api.md>"
> ],
>
> And then application components can query the API at run-time via
> regular WAMP RPC: see attached screenshot.
>
> The other way this will be exposed in Crossbar is: have a Web path
> service of resource type "apidoc", which renders above WAMP-flavored
> Markdown into regular HTML with nice CSS styles applied.
>
> ==
>
> I'd be interested in feedback on this.
>
> Does it make sense? Is it useful? If it does, we should probably add a
> description of both the WAMP reflection API and the WAMP-flavored
> Markdown format to the WAMP specification.
>
> Anway, what do you think?
>
> Tobias
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "WAMP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
wampws+un...@googlegroups.com
> <mailto:
wampws+un...@googlegroups.com>.
> To post to this group, send email to
wam...@googlegroups.com
> <mailto:
wam...@googlegroups.com>.
> Visit this group at
http://groups.google.com/group/wampws.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/wampws/176d3366-7b5c-4b9a-b79e-419f371ed4ce%40googlegroups.com
> <
https://groups.google.com/d/msgid/wampws/176d3366-7b5c-4b9a-b79e-419f371ed4ce%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.