Example: Context Representation

How can API consumer and provider exchange context information without relying on the remoting protocols (for instance, application protocols such as HTTP or transport protocols such as TCP)? In particular, how can identity information and quality properties in a request be made visible to related subsequent requests?

Context Representation

Example: Context Representation

See this OAS:

openapi: 3.0.1
info:
  title: ContextRepresentationExample
  version: "1.0"
servers: []
tags:
- name: CustomerInformationHolderService
  externalDocs:
    description: The role of this endpoint is not specified.
    url: ""
paths:
  /CustomerInformationHolderService:
    post:
      tags:
      - CustomerInformationHolderService
      summary: POST
      description: POST
      operationId: getCustomerAttributes
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                anonymous1:
                  type: object
                  properties:
                    requestContextSharedByAllOperations:
                      $ref: '#/components/schemas/RequestContext'
                    desiredCustomerAttributes:
                      minItems: 1
                      type: array
                      items:
                        type: string
                searchParameters:
                  type: array
                  items:
                    type: string
      responses:
        "200":
          description: getCustomerAttributes successful execution
          content:
            application/json:
              schema:
                type: object
                properties:
                  anonymous2:
                    type: object
                    properties:
                      anonymous3:
                        type: object
                        properties:
                          billingInfo:
                            type: integer
                            format: int32
                          moreAnalytics:
                            type: string
                      anonymous4:
                        type: object
                        properties:
                          errorCode:
                            type: integer
                            format: int32
                          errorMessage:
                            type: string
                  anonymous5:
                    type: object
                    properties:
                      anonymous6:
                        type: object
                        properties:
                          thisPageContent:
                            type: array
                            items:
                              $ref: '#/components/schemas/CustomerDTO'
                          previousPage:
                            type: string
                            format: uuid
                            nullable: true
                          nextPage:
                            type: string
                            format: uuid
                            nullable: true
components:
  schemas:
    KeyValuePair:
      type: object
    CustomerDTO:
      type: object
    RequestContext:
      type: object
      properties:
        apiKey:
          type: string
        sessionId:
          type: integer
          format: int32
          nullable: true
        qosPropertiesThatShouldNotGoToProtocolHeader:
          type: array
          items:
            $ref: '#/components/schemas/KeyValuePair'

This OAS was generated from MDSL.