DocumentationCheck that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context
Create one context source registration using the default context with JSON content type
[Documentation]Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context
[Tags]mandatory
${registration_id}=Generate Random Entity Id${registration_id_prefix}
${payload}=Load Json From File${EXECDIR}/data/${registration_payload_file_path}
${updated_payload}=Update Value To Json${payload}$..id${registration_id}
${request}${response}=Create Context Source Registration With Return${updated_payload}${CONTENT_TYPE_JSON}
Check Response Status Code201${response['status']}
DocumentationCheck that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term
Create one context source registration containing a JSON-LD @context with a JSON content type
[Documentation]Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term
[Tags]mandatory
${registration_id}=Generate Random Entity Id${registration_id_prefix}
${payload}=Load Json From File${EXECDIR}/data/${registration_payload_file_path}
${updated_payload}=Update Value To Json${payload}$..id${registration_id}
${request}${response}=Create Context Source Registration With Return${updated_payload}${CONTENT_TYPE_JSON}
Check Response Status Code400${response['status']}
Check Response Body Containing ProblemDetails Element Containing Type Element set to${response}${ERROR_TYPE_BAD_REQUEST_DATA}
Check Response Body Containing ProblemDetails Element Containing Title Element${response}
DocumentationCheck that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term
Create one context source registration not containing a JSON-LD @context with a JSON-LD content type
[Documentation]Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term
[Tags]mandatory
${registration_id}=Generate Random Entity Id${registration_id_prefix}
${payload}=Load Json From File${EXECDIR}/data/${registration_payload_file_path}
${updated_payload}=Update Value To Json${payload}$..id${registration_id}
${request}${response}=Create Context Source Registration With Return${updated_payload}${CONTENT_TYPE_LD_JSON}
Check Response Status Code400${response['status']}
Check Response Body Containing ProblemDetails Element Containing Type Element set to${response}${ERROR_TYPE_BAD_REQUEST_DATA}
Check Response Body Containing ProblemDetails Element Containing Title Element${response}