Details

    • Type: Sub-task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Vocabularies
    • Labels:
      None
    • Proposal:
      Hide

      Add a Details property to the HttpResponse complex type defined in ODATA-884:

      <Property Name="Details" Type="Collection(Core.HttpResponseCodeDetail)">
       Annotation Term="Core.Description" String="Descriptions of conditions resulting in the specified status code." />
      </Property>
      

      This points to a complex type representing a detailcode/description pair describing more details about the condition of the result code:

      <ComplexType Name="HttpResponseCodeDetail">
        <Property Name="SpecificErrorCode" Type="Edm.String">
          <Annotation Term="Core.Description" String="Language-independent, machine-readable specific error code" />
        </Property>
        <Property Name="Description" Type="Edm.String">
          <Annotation Term="Core.Description" String="Human-readable description of the response situation" />
          <Annotation Term="Core.IsLanguageDependent" />
        </Property>
      </ComplexType>
      
      Show
      Add a Details property to the HttpResponse complex type defined in ODATA-884 : <Property Name= "Details" Type= "Collection(Core.HttpResponseCodeDetail)" > Annotation Term= "Core.Description" String= "Descriptions of conditions resulting in the specified status code." /> </Property> This points to a complex type representing a detailcode/description pair describing more details about the condition of the result code: <ComplexType Name= "HttpResponseCodeDetail" > <Property Name= "SpecificErrorCode" Type= "Edm.String" > <Annotation Term= "Core.Description" String= "Language-independent, machine-readable specific error code" /> </Property> <Property Name= "Description" Type= "Edm.String" > <Annotation Term= "Core.Description" String= "Human-readable description of the response situation" /> <Annotation Term= "Core.IsLanguageDependent" /> </Property> </ComplexType>

      Description

      ODATA-884 introduced a way to describe the set of requests and associated valid responses that could be made against a resource.

      The response includes an HTTP Status code, and the initial proposal included the ability to specify the set of conditions under which the status code may be returned, including a human-readable string and a machine-readable error/status code.

      This detail error code and description would presumably be something that could be returned in the "details" section of an error response (i.e., "code" and "message" below):

      {
        "error": {
          "code": "501",
          "message": "Unsupported functionality",
          "target": "query",
          "details": [
           

      {        "code": "301",        "target": "$search"         "message": "$search query option not supported",       }

          ]
          "innererror": {
            "trace": [...],
            "context":

      {...}

          }
        }
      }

      This is similar to an effort going on in OpenAPI: https://github.com/OAI/OpenAPI-Specification/issues/1392
      which references: https://datatracker.ietf.org/doc/rfc7807/?include_text=1 Problem Details for HTTP APIs.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: