The block of the API page of an API (note: API) whose contract the build imported (3 passages, no note). It shows the contract (note: Contract) next to the note (note: Note) without copying anything into the markdown (note: Markdown): what the model knows of the contract stands in the served HTML, and the signatures (8 passages, no note) load as soon as the page runs its script (37 passages, no note).
Today
The block sits after the operations table (3 passages, no note) of the page and before the path of the file, under the heading "Interface contract". Its first line gives the format (16 passages, no note) the import (25 passages, no note) recorded (openapi 3.1, wsdl 1.1), the file the note names and, at its end, when the contract last changed relative to the build, "imported (4 passages, no note) 9 days ago": the date (44 passages, no note) of the last commit (29 passages, no note) of the file in its repository (note: Knowledge repository), the file date outside one, and the instant of the import only for a contract fetched from a URL. Its last line is the link (note: Link) "Download the contract (3 passages, no note)": the URL declared in the note when the contract is remote (6 passages, no note), or the copy of the file the build (note: Build) placed next to the page under the name the note points at, so that the original stays downloadable from the site (note: Site) as from its repository.
The operations (note: Operation) are not listed in the block: the table (40 passages, no note) above it matches (note: Occurrence) them to the notes, one row (41 passages, no note) per operation with its method (28 passages, no note), its path, its note and its callers, the operations the contract declares without a note and the notes the contract (4 passages, no note) does not declare in italics (3 passages, no note), the other direction of the gap (8 passages, no note) that the operation unmatched rule reports. Those rows are text in the served page: without JavaScript nothing is lost, and the search index (note: Search index) reads them with the rest of the page.
The viewer (55 passages, no note) itself is an island (note: Island), open in the page. Served, it holds one link, "Contract data (JSON)", to the view (48 passages, no note) of the contract the build wrote next to the fragments (note: Fragment) of the page; as soon as its script runs it fetches that view, once, "Loading (3 passages, no note) the contract…" standing (5 passages, no note) in the meantime, and opens in the block without any button, as the document viewer (note: Document viewer) opens on the document page (note: Document page). Loaded, it lists every operation in the order of the contract behind a disclosure (11 passages, no note) button, its signature (method and path for an HTTP (4 passages, no note) contract, operation, port and binding for a SOAP one) and its summary (24 passages, no note), opening on the parameters (3 passages, no note) with their location, requirement (3 passages, no note) and type (note: Type), the type of the request (31 passages, no note) body or input message (22 passages, no note), and one line per response (3 passages, no note) with its status (8 passages, no note), description (7 passages, no note) and body type; under the operations, a schema (31 passages, no note) explorer offers one button per schema or type the operations reference (30 passages, no note) and shows the selected one with its description and its fields (37 passages, no note), name, type, requirement and description. The note under the viewer says that no schema is copied into the text: the page shows the contract, it does not duplicate (10 passages, no note) it. When the view cannot be fetched, from a page opened on the disk for instance (3 passages, no note), the link to the JSON comes back with a sentence (25 passages, no note) saying so.
The same component (46 passages, no note) renders (24 passages, no note) an OpenAPI and a WSDL contract: the plugins (note: Plugin) that import them produce one common view, and the viewer never knows the format. It contains (3 passages, no note) no form (52 passages, no note) and no "Try it out": no request ever leaves the page towards the API described, and the only fetch of the whole site is the one of the view, once per page. The decision (62 passages, no note) purpose-built contract viewer says why no third (4 passages, no note)-party viewer is embedded.
Objects
Actions
- Open an operation → entity page, from the table of the API page
- Download the contract → the declared URL or the copy next to the page
- Open an operation of the viewer → its parameters, request and responses, fetched once with the view