IF Commons GitHub

logical/openapi

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-estate-endpoints-readers FR-001

OpenAPI and Swagger descriptions, as JSON or YAML: every server of the description is an endpoint (a templated address takes the default of its variable; a relative address has no host and is a problem, because it is only where the description was served from), with the way a client proves who it is from the security the description declares (none where it declares none, the strongest where it declares several), and api: openapi. Operations and schemas are not read.

import { importOpenApi } from "./openapi.ts";
importOpenApi("api.json", JSON.stringify({ openapi: "3.0.3", servers: [{ url: "https://api.example.test/v1" }] })).assets.length; // 1

Source: commons/estate-endpoints/src/logical/openapi.ts

1 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

logical.importOpenApifunctionno test imports it
function importOpenApi(source: string, text: string): Found

The endpoints of a description.

importOpenApifunction
function importOpenApi(source: string, text: string): Found

The endpoints of a description.

Imported by 8 tests of the run (8 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.