Skip to content

APICallMapper

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/api-call-mapper.ts

API Call Mapper

Methods

MethodSignatureReturns
detectAPICallsdetectAPICalls(entities: Entity[])DetectedAPICall[]
detectEndpointsdetectEndpoints(entities: Entity[])DetectedEndpoint[]
mapCallsToEndpointsmapCallsToEndpoints(calls: DetectedAPICall[], endpoints: DetectedEndpoint[])APIMapping[]

Where it refuses work

  • APICallMapper stops the work with an early return when call.method === endpoint.method && this.pathsMatch(callPath, endpoint.path).
  • APICallMapper stops the work with an early return when call.method === endpoint.method && this.pathsPartialMatch(callPath, endpoint.path).
  • APICallMapper stops the work with an early return when call.method === endpoint.method && this.pathsSimilar(callPath, endpoint.path).
  • APICallMapper stops the work with an early return when !base.
  • APICallMapper stops the work with an early return when !path.
  • APICallMapper stops the work with an early return when callSegments.length !== endpointSegments.length.

Was this page helpful?

Download as PDF