openapi: 3.0.0

info:
  version: 1.1.0
  title: VAE_V2VConfigRequirement
  description: |
    API for VAE_V2VConfigRequirement  
    © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

externalDocs:
  description: 3GPP TS 29.486 V18.3.0 V2X Application Enabler (VAE) Services
  url: 'https://www.3gpp.org/ftp/Specs/archive/29_series/29.486/'

security:
  - {}
  - oAuth2ClientCredentials: []

servers:
  - url: '{apiRoot}/vae-v2v-config-req/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 4.4 of 3GPP TS 29.501

paths:
  /configurations:
    post:
      summary: VAE V2V Configuration resource create service Operation
      tags:
        - V2V Configurations collection (Document)
      operationId: Create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2vConfigurationData'
        required: true
      responses:
        '201':
          description: V2V Configuration Resource Created
          headers:
            Location:
              description: 'Contains the URI of the newly created resource'
              required: true
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2vConfigurationData'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'
  /configurations/{configurationId}:
    get:
      summary: VAE V2V Configuration resource read service Operation
      tags:
        - Individual V2V Configuration (Document)
      operationId: ReadV2VConfiguration
      parameters:
        - name: configurationId
          in: path
          description: Identifier of a V2V Configuration resource
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK. Resource representation is returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2vConfigurationData'
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'
    put:
      summary: Updates/replaces an existing configuration resource
      tags:
        - VAE V2V Configuration resource put service Operation
      operationId: UpdateV2VConfiguration
      parameters:
        - name: configurationId
          in: path
          description: Identifier of a V2V Configuration resource
          required: true
          schema:
            type: string
      requestBody:
        description: Parameters to update/replace the existing configuration
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2vConfigurationData'
      responses:
        '200':
          description: OK (Successful update of the configuration)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2vConfigurationData'
        '204':
          description: No Content (Successful update of the configuration)
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'
    delete:
      summary: VAE V2V Configuration resource delete service Operation
      tags:
        - Individual V2V Configuration (Document)
      operationId: DeleteV2VConfiguration
      parameters:
        - name: configurationId
          in: path
          required: true
          description: Unique ID of the V2V Configuration to be deleted
          schema:
            type: string
      responses:
        '204':
          description: The configuration was deleted successfully.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

components:
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      flows: 
        clientCredentials: 
          tokenUrl: '{tokenUrl}'
          scopes: {}

  schemas:
    V2vConfigurationData:
      description: Contains the V2V configuration data.
      type: object
      properties:
        groupId:
          $ref: 'TS29486_VAE_MessageDelivery.yaml#/components/schemas/V2xGroupId'
        serviceId:
          $ref: 'TS29486_VAE_MessageDelivery.yaml#/components/schemas/V2xServiceId'
        canUeIds:
          type: array
          items:
            $ref: 'TS29486_VAE_MessageDelivery.yaml#/components/schemas/V2xUeId'
          minItems: 1
        appQosReq:
          $ref: 'TS29486_VAE_SessionOrientedService.yaml#/components/schemas/AppplicationQosRequirement'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'