Papupata Documentation

API Reference

class DeclaredAPI

property path

Purpose

The path to the API.

Usage

You can use this property if you want to access the path to the API as provided when declaring the API. Path parameters retain their placeholder values.

Examples

import { APIDeclaration } from 'papupata'
const api = new APIDeclaration()
const myAPI = api.declareGetAPI('/get-stuff/:id')
  .response<string>()

// myAPI.path === '/get-stuff/:id'