asyncapi: 2.6.0

info:
  title: EventZR Studio Service Async API
  version: 1.0.0
  description: >
    Kafka event specifications for studio-svc media generation service.
    All messages use CloudEvents 1.0 envelope format.
    Partition key is tenantId for tenant-scoped event ordering.
  contact:
    name: EventZR Platform Team
  license:
    name: Proprietary
    url: https://eventzr.com

servers:
  staging:
    url: boot-gpm4u49z.c2.kafka-serverless.us-east-1.amazonaws.com:9098
    protocol: kafka
    protocolVersion: '3.6'
    description: Amazon MSK Serverless (staging)
    security:
      - saslIam: []

defaultContentType: application/json

channels:
  # ---------------------------------------------------------------------------
  # PRODUCED TOPICS (studio-svc publishes these)
  # ---------------------------------------------------------------------------

  eventzr.media.render.created.v1:
    description: Published when a new render job is created and queued for processing.
    publish:
      operationId: publishRenderJobCreated
      summary: Render job created
      message:
        $ref: '#/components/messages/RenderJobCreatedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.media.render.started.v1:
    description: Published when a render job begins processing.
    publish:
      operationId: publishRenderJobStarted
      summary: Render job started
      message:
        $ref: '#/components/messages/RenderJobStartedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.media.render.completed.v1:
    description: Published when a render job completes successfully.
    publish:
      operationId: publishRenderJobCompleted
      summary: Render job completed
      message:
        $ref: '#/components/messages/RenderJobCompletedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.media.render.failed.v1:
    description: Published when a render job fails.
    publish:
      operationId: publishRenderJobFailed
      summary: Render job failed
      message:
        $ref: '#/components/messages/RenderJobFailedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.media.render.cancelled.v1:
    description: Published when a render job is cancelled by the user or system.
    publish:
      operationId: publishRenderJobCancelled
      summary: Render job cancelled
      message:
        $ref: '#/components/messages/RenderJobCancelledEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.media.render.retried.v1:
    description: Published when a failed render job is retried.
    publish:
      operationId: publishRenderJobRetried
      summary: Render job retried
      message:
        $ref: '#/components/messages/RenderJobRetriedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.media.render.status-updated.v1:
    description: Published on any render job status transition.
    publish:
      operationId: publishRenderJobStatusUpdated
      summary: Render job status updated
      message:
        $ref: '#/components/messages/RenderJobStatusUpdatedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.template.created.v1:
    description: Published when a new media template is created.
    publish:
      operationId: publishTemplateCreated
      summary: Template created
      message:
        $ref: '#/components/messages/TemplateCreatedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.template.published.v1:
    description: Published when a template is made available to users.
    publish:
      operationId: publishTemplatePublished
      summary: Template published
      message:
        $ref: '#/components/messages/TemplatePublishedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.template.approved.v1:
    description: Published when a template is approved for marketplace or publication.
    publish:
      operationId: publishTemplateApproved
      summary: Template approved
      message:
        $ref: '#/components/messages/TemplateApprovedEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  eventzr.voice.model.ready.v1:
    description: Published when a voice model completes training and is ready to use.
    publish:
      operationId: publishVoiceModelReady
      summary: Voice model ready
      message:
        $ref: '#/components/messages/VoiceModelReadyEvent'
      bindings:
        kafka:
          key:
            type: string
            description: tenantId (partition key)

  # ---------------------------------------------------------------------------
  # CONSUMED TOPICS (studio-svc subscribes to these)
  # ---------------------------------------------------------------------------

  eventzr.event.created.v1:
    description: >
      Consumed from event-svc. Triggers AI asset generation for newly created
      events (promotional images, description variations, social media captions).
    subscribe:
      operationId: onEventCreated
      summary: Handle event created
      bindings:
        kafka:
          groupId: studio-svc-event-created
      message:
        $ref: '#/components/messages/EventCreatedEvent'

  eventzr.event.published.v1:
    description: >
      Consumed from event-svc. Triggers social media asset generation for
      published events (platform-specific images for Instagram, Facebook, Twitter).
    subscribe:
      operationId: onEventPublished
      summary: Handle event published
      bindings:
        kafka:
          groupId: studio-svc-event-published
      message:
        $ref: '#/components/messages/EventPublishedEvent'

  eventzr.cms.published.v1:
    description: >
      Consumed from cms-svc. Generates featured images, Open Graph images,
      and social share images for published CMS content.
    subscribe:
      operationId: onCMSPublished
      summary: Handle CMS content published
      bindings:
        kafka:
          groupId: studio-svc-cms-published
      message:
        $ref: '#/components/messages/CMSPublishedEvent'

  eventzr.campaign.launched.v1:
    description: >
      Consumed from campaign-svc. Generates channel-specific creative assets
      (email banners, social media posts) for launched campaigns.
    subscribe:
      operationId: onCampaignLaunched
      summary: Handle campaign launched
      bindings:
        kafka:
          groupId: studio-svc-campaign-launched
      message:
        $ref: '#/components/messages/CampaignLaunchedEvent'

components:
  securitySchemes:
    saslIam:
      type: scramSha512
      description: AWS MSK IAM authentication via SASL

  schemas:
    # -------------------------------------------------------------------------
    # CloudEvents envelope
    # -------------------------------------------------------------------------
    CloudEventEnvelope:
      type: object
      required:
        - specversion
        - type
        - source
        - id
        - time
        - datacontenttype
        - data
      properties:
        specversion:
          type: string
          const: '1.0'
          description: CloudEvents specification version
        type:
          type: string
          description: Event type identifier (topic name)
        source:
          type: string
          description: Originating service
        id:
          type: string
          description: Unique event ID (ULID)
        time:
          type: string
          format: date-time
          description: Event timestamp (ISO 8601)
        datacontenttype:
          type: string
          const: application/json
        subject:
          type: string
          description: Subject entity ID

    # -------------------------------------------------------------------------
    # Render Job payloads
    # -------------------------------------------------------------------------
    RenderJobEventData:
      type: object
      required:
        - job_id
      properties:
        job_id:
          type: string
          format: uuid
        type:
          type: string
          description: 'Render type (image, video, audio, tts, stt)'
        status:
          type: string
          description: 'Current job status'
        retry_count:
          type: integer
      additionalProperties: true

    RenderJobStartedData:
      type: object
      required:
        - jobId
        - tenantId
        - userId
        - type
      properties:
        jobId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        type:
          type: string
          description: 'Render type (image, video, audio, tts, stt)'
        provider:
          type: string
          description: 'AI provider used (dall-e-3, stable-diffusion, etc.)'
        templateId:
          type: string
          format: uuid
          nullable: true
        inputParams:
          type: object
          additionalProperties: true
        priority:
          type: integer
        startedAt:
          type: string
          format: date-time

    RenderJobCompletedData:
      type: object
      required:
        - jobId
        - tenantId
        - userId
        - type
      properties:
        jobId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        type:
          type: string
        provider:
          type: string
        templateId:
          type: string
          format: uuid
          nullable: true
        outputUrl:
          type: string
          format: uri
          nullable: true
        outputUrls:
          type: array
          items:
            type: string
            format: uri
          nullable: true
        vaultAssetId:
          type: string
          format: uuid
          nullable: true
        outputMetadata:
          type: object
          additionalProperties: true
          nullable: true
        creditsCharged:
          type: number
          nullable: true
        startedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        duration:
          type: integer
          description: Duration in milliseconds
          nullable: true

    RenderJobFailedData:
      type: object
      required:
        - jobId
        - tenantId
        - userId
        - type
      properties:
        jobId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        type:
          type: string
        provider:
          type: string
        templateId:
          type: string
          format: uuid
          nullable: true
        errorMessage:
          type: string
          nullable: true
        errorCode:
          type: string
          nullable: true
        retryCount:
          type: integer
        maxRetries:
          type: integer
        startedAt:
          type: string
          format: date-time
          nullable: true
        canRetry:
          type: boolean

    # -------------------------------------------------------------------------
    # Template payloads
    # -------------------------------------------------------------------------
    TemplateCreatedData:
      type: object
      required:
        - templateId
        - tenantId
        - userId
        - name
        - type
      properties:
        templateId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        description:
          type: string
          nullable: true
        type:
          type: string
          description: 'Template type (image, video, audio, social, email)'
        category:
          type: string
          nullable: true
        config:
          type: object
          additionalProperties: true
          nullable: true
        variables:
          type: array
          items:
            type: object
          nullable: true
        visibility:
          type: string
          enum: [private, tenant, public]
        status:
          type: string
        isMarketplace:
          type: boolean
        priceCredits:
          type: number
          nullable: true
        previewUrl:
          type: string
          format: uri
          nullable: true
        thumbnailUrl:
          type: string
          format: uri
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
        aiGenerated:
          type: boolean
        version:
          type: integer
        createdAt:
          type: string
          format: date-time

    TemplatePublishedData:
      type: object
      required:
        - templateId
        - tenantId
        - userId
        - name
        - type
      properties:
        templateId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        description:
          type: string
          nullable: true
        type:
          type: string
        category:
          type: string
          nullable: true
        visibility:
          type: string
          enum: [private, tenant, public]
        status:
          type: string
        isMarketplace:
          type: boolean
        priceCredits:
          type: number
          nullable: true
        previewUrl:
          type: string
          format: uri
          nullable: true
        thumbnailUrl:
          type: string
          format: uri
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
        featured:
          type: boolean
        publishedAt:
          type: string
          format: date-time
          nullable: true
        version:
          type: integer

    TemplateApprovedData:
      type: object
      required:
        - templateId
        - tenantId
        - userId
        - name
        - type
      properties:
        templateId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        type:
          type: string
        category:
          type: string
          nullable: true
        status:
          type: string
        isMarketplace:
          type: boolean
        priceCredits:
          type: number
          nullable: true
        featured:
          type: boolean
        rating:
          type: number
          nullable: true
        ratingCount:
          type: integer
          nullable: true
        useCount:
          type: integer
          nullable: true
        publishedAt:
          type: string
          format: date-time
          nullable: true
        version:
          type: integer

    # -------------------------------------------------------------------------
    # Voice Model payload
    # -------------------------------------------------------------------------
    VoiceModelReadyData:
      type: object
      required:
        - modelId
        - tenantId
        - userId
        - name
        - type
        - status
      properties:
        modelId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        type:
          type: string
          description: 'Voice model type (clone, preset, custom)'
        status:
          type: string
        gender:
          type: string
          nullable: true
        language:
          type: string
          nullable: true
        provider:
          type: string
          nullable: true
        providerId:
          type: string
          nullable: true
        sampleUrl:
          type: string
          format: uri
          nullable: true
        characteristics:
          type: object
          additionalProperties: true
          nullable: true
        isPublic:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time

    # -------------------------------------------------------------------------
    # Consumed event payloads
    # -------------------------------------------------------------------------
    EventCreatedData:
      type: object
      required:
        - eventId
        - tenantId
        - userId
        - name
        - slug
        - startDate
        - endDate
        - status
      properties:
        eventId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        description:
          type: string
          nullable: true
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
        venueId:
          type: string
          format: uuid
          nullable: true
        categoryId:
          type: string
          nullable: true
        status:
          type: string
        imageUrl:
          type: string
          format: uri
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true

    EventPublishedData:
      type: object
      required:
        - eventId
        - tenantId
        - userId
        - name
        - slug
        - startDate
        - endDate
      properties:
        eventId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
        description:
          type: string
          nullable: true
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
        imageUrl:
          type: string
          format: uri
          nullable: true
        socialMediaConfig:
          type: object
          nullable: true
          properties:
            platforms:
              type: array
              items:
                type: string
                enum: [instagram, facebook, twitter, linkedin]
            hashtags:
              type: array
              items:
                type: string
              nullable: true
            mentions:
              type: array
              items:
                type: string
              nullable: true

    CMSPublishedData:
      type: object
      required:
        - contentId
        - tenantId
        - userId
        - contentType
        - title
        - slug
        - publishedAt
      properties:
        contentId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        contentType:
          type: string
          enum: [article, blog, page, announcement, news]
        title:
          type: string
        slug:
          type: string
        excerpt:
          type: string
          nullable: true
        body:
          type: string
          nullable: true
        categoryId:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
        publishedAt:
          type: string
          format: date-time
        featuredImageUrl:
          type: string
          format: uri
          nullable: true
        author:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            avatar:
              type: string
              format: uri
              nullable: true
        seo:
          type: object
          nullable: true
          properties:
            title:
              type: string
              nullable: true
            description:
              type: string
              nullable: true
            keywords:
              type: array
              items:
                type: string
              nullable: true

    CampaignLaunchedData:
      type: object
      required:
        - campaignId
        - tenantId
        - userId
        - name
        - type
        - launchedAt
      properties:
        campaignId:
          type: string
          format: uuid
        tenantId:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
        name:
          type: string
        type:
          type: string
          enum: [email, social, multi-channel, event-promotion, brand-awareness]
        description:
          type: string
          nullable: true
        targetAudience:
          type: object
          nullable: true
          properties:
            segments:
              type: array
              items:
                type: string
              nullable: true
            demographics:
              type: object
              additionalProperties: true
              nullable: true
            size:
              type: integer
              nullable: true
        channels:
          type: array
          items:
            type: string
            enum: [email, facebook, instagram, twitter, linkedin, sms]
          nullable: true
        schedule:
          type: object
          nullable: true
          properties:
            startDate:
              type: string
              format: date-time
            endDate:
              type: string
              format: date-time
              nullable: true
            timezone:
              type: string
              nullable: true
        budget:
          type: object
          nullable: true
          properties:
            total:
              type: number
              nullable: true
            currency:
              type: string
              nullable: true
        goals:
          type: object
          nullable: true
          properties:
            impressions:
              type: integer
              nullable: true
            clicks:
              type: integer
              nullable: true
            conversions:
              type: integer
              nullable: true
        branding:
          type: object
          nullable: true
          properties:
            primaryColor:
              type: string
              nullable: true
            secondaryColor:
              type: string
              nullable: true
            logoUrl:
              type: string
              format: uri
              nullable: true
            fontFamily:
              type: string
              nullable: true
        content:
          type: object
          nullable: true
          properties:
            headline:
              type: string
              nullable: true
            tagline:
              type: string
              nullable: true
            callToAction:
              type: string
              nullable: true
        tags:
          type: array
          items:
            type: string
          nullable: true
        launchedAt:
          type: string
          format: date-time

  messages:
    # -------------------------------------------------------------------------
    # Produced messages
    # -------------------------------------------------------------------------
    RenderJobCreatedEvent:
      name: RenderJobCreatedEvent
      title: Render Job Created
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.media.render.created.v1
              data:
                $ref: '#/components/schemas/RenderJobEventData'

    RenderJobStartedEvent:
      name: RenderJobStartedEvent
      title: Render Job Started
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.media.render.started.v1
              data:
                $ref: '#/components/schemas/RenderJobStartedData'

    RenderJobCompletedEvent:
      name: RenderJobCompletedEvent
      title: Render Job Completed
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.media.render.completed.v1
              data:
                $ref: '#/components/schemas/RenderJobCompletedData'

    RenderJobFailedEvent:
      name: RenderJobFailedEvent
      title: Render Job Failed
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.media.render.failed.v1
              data:
                $ref: '#/components/schemas/RenderJobFailedData'

    RenderJobCancelledEvent:
      name: RenderJobCancelledEvent
      title: Render Job Cancelled
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.media.render.cancelled.v1
              data:
                $ref: '#/components/schemas/RenderJobEventData'

    RenderJobRetriedEvent:
      name: RenderJobRetriedEvent
      title: Render Job Retried
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.media.render.retried.v1
              data:
                $ref: '#/components/schemas/RenderJobEventData'

    RenderJobStatusUpdatedEvent:
      name: RenderJobStatusUpdatedEvent
      title: Render Job Status Updated
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.media.render.status-updated.v1
              data:
                $ref: '#/components/schemas/RenderJobEventData'

    TemplateCreatedEvent:
      name: TemplateCreatedEvent
      title: Template Created
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.template.created.v1
              data:
                $ref: '#/components/schemas/TemplateCreatedData'

    TemplatePublishedEvent:
      name: TemplatePublishedEvent
      title: Template Published
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.template.published.v1
              data:
                $ref: '#/components/schemas/TemplatePublishedData'

    TemplateApprovedEvent:
      name: TemplateApprovedEvent
      title: Template Approved
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.template.approved.v1
              data:
                $ref: '#/components/schemas/TemplateApprovedData'

    VoiceModelReadyEvent:
      name: VoiceModelReadyEvent
      title: Voice Model Ready
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.voice.model.ready.v1
              data:
                $ref: '#/components/schemas/VoiceModelReadyData'

    # -------------------------------------------------------------------------
    # Consumed messages
    # -------------------------------------------------------------------------
    EventCreatedEvent:
      name: EventCreatedEvent
      title: Event Created (from event-svc)
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.event.created.v1
              data:
                $ref: '#/components/schemas/EventCreatedData'

    EventPublishedEvent:
      name: EventPublishedEvent
      title: Event Published (from event-svc)
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.event.published.v1
              data:
                $ref: '#/components/schemas/EventPublishedData'

    CMSPublishedEvent:
      name: CMSPublishedEvent
      title: CMS Content Published (from cms-svc)
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.cms.published.v1
              data:
                $ref: '#/components/schemas/CMSPublishedData'

    CampaignLaunchedEvent:
      name: CampaignLaunchedEvent
      title: Campaign Launched (from campaign-svc)
      contentType: application/json
      traits:
        - $ref: '#/components/messageTraits/CloudEventHeaders'
      payload:
        allOf:
          - $ref: '#/components/schemas/CloudEventEnvelope'
          - type: object
            properties:
              type:
                const: eventzr.campaign.launched.v1
              data:
                $ref: '#/components/schemas/CampaignLaunchedData'

  messageTraits:
    CloudEventHeaders:
      headers:
        type: object
        properties:
          ce_specversion:
            type: string
            const: '1.0'
          ce_type:
            type: string
            description: CloudEvents type
          ce_source:
            type: string
            description: Originating service
          ce_id:
            type: string
            description: Unique event ID (ULID)
          ce_time:
            type: string
            format: date-time
          ce_datacontenttype:
            type: string
            const: application/json
