Kind: Class
Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/api-call-mapper.ts
API Call Mapper
Methods
| Method | Signature | Returns |
|---|---|---|
detectAPICalls | detectAPICalls(entities: Entity[]) | DetectedAPICall[] |
detectEndpoints | detectEndpoints(entities: Entity[]) | DetectedEndpoint[] |
mapCallsToEndpoints | mapCallsToEndpoints(calls: DetectedAPICall[], endpoints: DetectedEndpoint[]) | APIMapping[] |
Where it refuses work
APICallMapperstops the work with an early return whencall.method === endpoint.method && this.pathsMatch(callPath, endpoint.path).APICallMapperstops the work with an early return whencall.method === endpoint.method && this.pathsPartialMatch(callPath, endpoint.path).APICallMapperstops the work with an early return whencall.method === endpoint.method && this.pathsSimilar(callPath, endpoint.path).APICallMapperstops the work with an early return when!base.APICallMapperstops the work with an early return when!path.APICallMapperstops the work with an early return whencallSegments.length !== endpointSegments.length.
Was this page helpful?