openapi: 3.0.0

info:
  title: SM Server Spatial Maps and SMAS Discovery Service
  version: 1.0.1
  description: |
    Spatial Maps and SMAS Discovery Service.
    ©2026, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
    All rights reserved.

externalDocs:
  description: >
    3GPP TS 29.437 V19.1.0; Service Enabler Architecture Layer for Verticals (SEAL);
    Metaverse Enablement Services; Stage 3.
  url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.437/

servers:
  - url: "{apiRoot}/ssm-disc/v1"
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 6.5 of 3GPP TS 29.549.

security:
  - {}
  - oAuth2ClientCredentials: []

paths:
  /spatial-maps:
    get:
      summary: Discover spatial maps or SMAS information from the SM Server.
      operationId: DiscSpatialMapsSmas
      tags:
        - Spatial Maps (Collection)
      parameters:
        - name: app-svc-id
          in: query
          description: >
            Contains the identifier of VAL application service.
          schema:
            type: string
        - name: map-disc-fltr
          in: query
          description: >
            Contains the set of characteristics related to the spatial maps.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpatialMapsDiscFilter'
        - name: loc-info
          in: query
          description: >
            Contains the three-dimensional area information, location information and direction.
          content:
            application/json:
              schema:
                $ref: 'TS29122_MonitoringEvent.yaml#/components/schemas/LocationInfo'
        - name: pose
          in: query
          description: >
            Contains the pose information.
          content:
            application/json:
              schema:
                $ref: 'TS29437_SS_SAnManagement.yaml#/components/schemas/Pose'
        - name: supp-feats
          in: query
          description: >
            Contains the list of supported feature(s) among the ones defined in clause 6.2.2.8.
          content:
            application/json:
              schema:
                $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      responses:
        '200':
          description: >
            OK. The requested spatial map or SMAS information is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpatialMapsDiscResp'
        '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'

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

  schemas:

#
# STRUCTURED DATA TYPES
#

    SpatialMapsDiscFilter:
      description: >
        Represents the discovery filter information for spatial maps.
      type: object
      properties:
        mapLyrList:
          $ref: 'TS29437_SS_SmManagement.yaml#/components/schemas/SpatialMapLayers'

    SpatialMapsDiscResp:
      description: >
        Represents the spatial maps discovery response.
      type: object
      properties:
        svcId:
          type: string
        mapsDisc:
          type: array
          items:
            $ref: '#/components/schemas/SpatialMapDiscovered'
          minItems: 0
        smasList:
          type: array
          items:
            $ref: 'TS29437_SS_SmSmasRegistration.yaml#/components/schemas/SMASProfile'
          minItems: 0
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      anyOf:
        - required: [mapsDisc]
        - required: [smasList]

    SpatialMapDiscovered:
      description: >
        Represents the discovered spatial maps.
      type: object
      properties:
        mapId:
          $ref: 'TS29437_SS_SmManagement.yaml#/components/schemas/SpatialMapId'
      required:
        - mapId


# SIMPLE DATA TYPES
#

#
# ENUMERATIONS
#

# Data types describing alternative data types or combinations of data types:
#
