OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

camp message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] Commented: (CAMP-80) Section 6.11 "Registering an Application" is unclear about what Content-Type header must be for various scenarios

    [ http://tools.oasis-open.org/issues/browse/CAMP-80?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34419#action_34419 ] 

Alex Heneveld commented on CAMP-80:

Wouldn't it be so much simpler to add some kind of "reference" keyword to our DP schema?

This would make the whole problem here go away.  We can then accept a POST, and whether it is JSON or YAML, and whether it is a DP by-value or merely a reference to another (P)DP -- we don't care at this stage.  There is no need for the `if contentType X then treatAsReference else treatAsValue` semantics.  We resolve references when we interpret the (P)DP.

This also makes things much more powerful as I can have nested references -- if I have a PDP at URL1 for a WebServer, and a PDP at URL2 for a Database, I can for instance post a DP or PDP which refers to both of those.

Relying on content type feels like a bad idea, even if it is technically possible.  Most JSON is also valid YAML, even if it isn't a formal superset as you note.  Under your proposal my DP might be valid JSON and valid YAML, but if I post it as JSON it won't work -- that will be a WTF for users.

(And please note, I did not say "JSON means PDP" -- I said "JSON means PDP *reference*".)

> Section 6.11 "Registering an Application" is unclear about what Content-Type header must be for various scenarios
> -----------------------------------------------------------------------------------------------------------------
>                 Key: CAMP-80
>                 URL: http://tools.oasis-open.org/issues/browse/CAMP-80
>             Project: OASIS Cloud Application Management for Platforms (CAMP) TC
>          Issue Type: Bug
>            Reporter: Gilbert Pilz
>            Priority: Critical
> While implementing the code for Section 6.11 I noticed that there are a couple of scenarios in which the spec is unclear about the expected Content-Type of the POST request. The more minor of these is the case in which the Consumer POSTs a JSON object that contains the URI of the PDP or DP. Since the request is JSON, an implementer can infer that the Content-Type should be "application/json", but the spec should really be clear about this just to avoid any misunderstandings.
> The second, and more serious, case is when the Consumer directly POSTs the contents of a DP in the request body.
> This is important because, as defined in the spec, Content-Type is the only information an implementation has to figure out which of the four different methods a Consumer is attempting to use when they POST to the Platform resource.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]