Optimizely · OpenAPI Overlay 1.0.0

API Evangelist conversational phrasing for Admin API V1 Style Traits API

11 actions 11 updates phrasing extends openapi/optimizely-style-traits-api-openapi.yml
Generated by API Evangelist Written by API Evangelist tooling for Optimizely's API. It is a proposal applied on top of the contract, not a document Optimizely publishes.
View Overlay File View on GitHub Overlay Specification

What the actions change

x-apievangelist-phrasing

Targets 11

$.info
$.paths['/api/v1/admin/StyleTraits'].get
$.paths['/api/v1/admin/StyleTraits'].post
$.paths['/api/v1/admin/StyleTraits({id})'].get
$.paths['/api/v1/admin/StyleTraits({id})'].put
$.paths['/api/v1/admin/StyleTraits({id})'].delete
$.paths['/api/v1/admin/StyleTraits({id})'].patch
$.paths['/api/v1/admin/StyleTraits/Default.Default()'].get
$.paths['/api/v1/admin/styletraits/delete'].delete
$.paths['/api/v1/admin/styletraits({key})/customproperties({custompropertyKey})'].get
$.paths['/api/v1/admin/styletraits({key})/styletraitvalues({styletraitvalueKey})'].get

OpenAPI Overlay

Raw ↑
# Generated by API Evangelist (build-phrasing.py). Our phrasing, not observed demand.
overlay: 1.0.0
info:
  title: API Evangelist conversational phrasing for Admin API V1 Style Traits API
  version: 1.0.0
extends: openapi/optimizely-style-traits-api-openapi.yml
actions:
- target: $.info
  update:
    x-apievangelist-phrasing:
      method: generated
      generated: '2026-09-26'
      generator: build-phrasing.py
      label: Generated by API Evangelist
      operations: 10
- target: $.paths['/api/v1/admin/StyleTraits'].get
  update:
    x-apievangelist-phrasing:
      intent: List product style traits
      effect: read
      questions:
      - Which style traits like color or size are defined for my product variants?
      - Can I filter style traits by style class?
      - How do I get a count of all style traits?
      instructions:
      - text: List all style traits.
      - text: Find style traits matching {filter}.
        slots:
          filter: query.$filter
      - text: Show style traits sorted by {orderby}, skipping {skip}.
        slots:
          orderby: query.$orderby
          skip: query.$skip
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/StyleTraits'].post
  update:
    x-apievangelist-phrasing:
      intent: Create a style trait
      effect: write
      questions:
      - How do I add a new style trait such as Color to a style class?
      - Can I choose a swatch display type when creating a style trait?
      instructions:
      - text: Create style trait {name} in style class {styleClassId} with unselected text {unselectedValue}.
        slots:
          name: requestBody.name
          styleClassId: requestBody.styleClassId
          unselectedValue: requestBody.unselectedValue
      - text: Add a style trait {name} described as {description} shown as {displayType}.
        slots:
          name: requestBody.name
          description: requestBody.description
          displayType: requestBody.displayType
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/StyleTraits({id})'].get
  update:
    x-apievangelist-phrasing:
      intent: Get one style trait
      effect: read
      questions:
      - What are the display settings of a specific style trait?
      - How many swatches does a given style trait show?
      instructions:
      - text: Get style trait {id}.
        slots:
          id: path.id
      - text: Show style trait {id} with {expand} expanded.
        slots:
          id: path.id
          expand: query.$expand
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/StyleTraits({id})'].put
  update:
    x-apievangelist-phrasing:
      intent: Replace a style trait record
      effect: write
      questions:
      - How do I overwrite every field of a style trait at once?
      - Can I fully replace a style trait definition?
      instructions:
      - text: Replace style trait {id} with name {name} and description {description}.
        slots:
          id: path.id
          name: requestBody.name
          description: requestBody.description
      - text: Overwrite the whole record for style trait {id}.
        slots:
          id: path.id
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/StyleTraits({id})'].delete
  update:
    x-apievangelist-phrasing:
      intent: Delete a style trait
      effect: destructive
      questions:
      - How do I remove a single style trait?
      - Can I delete a style trait only if nobody changed it since I read it?
      instructions:
      - text: Delete style trait {id}.
        slots:
          id: path.id
      - text: Delete style trait {id} if its ETag matches {ifMatch}.
        slots:
          id: path.id
          ifMatch: header.If-Match
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/StyleTraits({id})'].patch
  update:
    x-apievangelist-phrasing:
      intent: Partially update a style trait
      effect: write
      questions:
      - Can I change only the sort order of a style trait?
      - How do I switch a style trait to show text alongside swatches?
      instructions:
      - text: Set the sort order of style trait {id} to {sortOrder}.
        slots:
          id: path.id
          sortOrder: requestBody.sortOrder
      - text: Show {numberOfSwatchesVisible} swatches for style trait {id}.
        slots:
          numberOfSwatchesVisible: requestBody.numberOfSwatchesVisible
          id: path.id
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/StyleTraits/Default.Default()'].get
  update:
    x-apievangelist-phrasing:
      intent: Get the default style trait template
      effect: read
      questions:
      - What default values does a new style trait start with?
      - Is there a blank style trait template to fetch?
      instructions:
      - text: Fetch the default style trait template.
      - text: Get default values for a new style trait.
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/styletraits/delete'].delete
  update:
    x-apievangelist-phrasing:
      intent: Bulk delete style traits
      effect: destructive
      questions:
      - How do I delete several style traits in one request?
      - Can I remove multiple style traits by passing their IDs?
      instructions:
      - text: Bulk delete style traits {ids}.
        slots:
          ids: query.ids
      - text: 'Remove all these style traits at once: {ids}.'
        slots:
          ids: query.ids
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/styletraits({key})/customproperties({custompropertyKey})'].get
  update:
    x-apievangelist-phrasing:
      intent: Get a custom property of a style trait
      effect: read
      questions:
      - How do I read a custom property on a style trait?
      - Can I fetch one custom field value from a style trait?
      instructions:
      - text: Get custom property {custompropertyKey} of style trait {key}.
        slots:
          custompropertyKey: path.custompropertyKey
          key: path.key
      - text: Show custom field {custompropertyKey} on style trait {key}.
        slots:
          custompropertyKey: path.custompropertyKey
          key: path.key
      method: generated
      generated: '2026-09-26'
- target: $.paths['/api/v1/admin/styletraits({key})/styletraitvalues({styletraitvalueKey})'].get
  update:
    x-apievangelist-phrasing:
      intent: Get one value of a style trait
      effect: read
      questions:
      - How do I look up a specific option, like Red, under a style trait?
      - Can I fetch a single style trait value by its key?
      instructions:
      - text: Get value {styletraitvalueKey} of style trait {key}.
        slots:
          styletraitvalueKey: path.styletraitvalueKey
          key: path.key
      - text: Show option {styletraitvalueKey} under style trait {key}.
        slots:
          styletraitvalueKey: path.styletraitvalueKey
          key: path.key
      method: generated
      generated: '2026-09-26'