Last updated

Named Path Items

New to OAS 3.1

Reusable pathItems can be declared in the components.

Path items can be named in the components

components:
  pathItems:
    getStatus:
      # PathItem Object

Visual

Types

  • NamedPathItems is a map of PathItem objects (OAS 3.1 only)
  • PathItem
const PathItem: NodeType = {
  properties: {
    $ref: { type: 'string' },
    servers: listOf('Server'),
    parameters: listOf('Parameter'),
    summary: { type: 'string' },
    description: { type: 'string' },
    get: 'Operation',
    put: 'Operation',
    post: 'Operation',
    delete: 'Operation',
    options: 'Operation',
    head: 'Operation',
    patch: 'Operation',
    trace: 'Operation',
  },
};