import { usePaths } from 'vitepress-openapi'
import spec from '../../.vitepress/theme/openapi.json' with {type: 'json'}

export default {
  paths() {
    return usePaths({ spec })
      .getPathsByVerbs()
      .map(({ operationId, summary }) => {
        return {
          params: {
            operationId,
            pageTitle: `${summary} - NyaHome API`,
          },
        }
      })
  },
}