apcore-toolkit

Turn API contracts
into module definitions.

Use scanners, schema utilities, and writers to prepare apcore modules from existing application interfaces. The toolkit helps integration authors reuse the same conversion across surfaces.

From OpenAPI operation to module definition
OpenAPI 3.0 or 3.1Operations, parameters, request bodies, and response schemas
OpenAPIScannerProduce module IDs and input/output schemas
Writer or adapterReview the definitions, then write bindings or register modules

What the toolkit prepares

Browse capability details
  • Scan existing interfaces

    Translate OpenAPI operations into module definitions or use the scanner interfaces to integrate a framework.

  • Reuse schema utilities

    Extract input and output schemas and resolve references before adding the definitions to a surface.

  • Choose an output

    Generate YAML bindings or use a registry writer. A surface adapter publishes the result when you are ready.

Scan an OpenAPI document

Use Python and put an existing OpenAPI 3.0 or 3.1 JSON document in the working directory as openapi.json.

Open the quickstart guide
  1. Install the toolkit

    Install it in the environment you use for integration work.

    Shell
    python -m pip install apcore-toolkit
  2. Scan the document

    Save this as scan_api.py. The scanner produces module definitions from operations in the input file.

    scan_api.py
    import json
    from pathlib import Path
    
    from apcore_toolkit import OpenAPIScanner
    
    spec = json.loads(Path("openapi.json").read_text())
    for module in OpenAPIScanner().scan(spec):
        print(module.module_id)
        print(json.dumps(module.input_schema, indent=2))
  3. Inspect the output

    Run the script to print each discovered module ID and its input schema.

    Shell
    python scan_api.py

Documentation

Browse all docs

Detailed capabilities and configuration

Choose a topic

Canonical Module Model

Normalize discovered capabilities as ScannedModule values with schemas, annotations, metadata, and targets