nodehive_public_api.redirect:
  path: '/nodehive-api'
  defaults:
    _controller: '\Drupal\nodehive_public_api\Controller\ApiController::redirectToV1'
  methods: [GET]
  requirements:
    _permission: 'access nodehive public api'

nodehive_public_api.index:
  path: '/nodehive-api/v1'
  defaults:
    _controller: '\Drupal\nodehive_public_api\Controller\ApiController::index'
  methods: [GET]
  requirements:
    _permission: 'access nodehive public api'

nodehive_public_api.menu:
  path: '/nodehive-api/v1/menu/{menu_id}'
  defaults:
    _controller: '\Drupal\nodehive_public_api\Controller\MenuApiController::getMenu'
  methods: [GET]
  requirements:
    _permission: 'access nodehive public api'
  options:
    parameters:
      menu_id:
        type: string

nodehive_public_api.space:
  path: '/nodehive-api/v1/space/{space_id}'
  defaults:
    _controller: '\Drupal\nodehive_public_api\Controller\SpacesApiController::getSpace'
  methods: [GET]
  requirements:
    _permission: 'access nodehive public api'
  options:
    parameters:
      space_id:
        type: string
