API guide

OpenAPI to OKF conversion guide

OpenAPI to OKF is a workflow for keeping OpenAPI as the API contract while moving reviewed endpoint context, owner notes, examples, limits, and support notes into OKF files.

Short answer

Do not replace OpenAPI with OKF. Convert endpoint context, not the contract itself.

What OpenAPI to OKF means

OpenAPI paths, methods, parameters, schemas, responses, and authentication patterns stay in OpenAPI. OKF carries the surrounding context: owners, examples, limits, support notes, review warnings, and related docs.

What OKF adds

OKF adds owner notes, support context, examples, limits, review warnings, and related documentation around an API contract. It should point back to OpenAPI instead of copying schema details blindly.

Before you convert

OpenAPI field to OKF context map

OpenAPI input
OKF output
Review note
Operation summary
OKF title and description
Rewrite for business meaning, not just method names.
Path and method
Markdown body and resource link
Keep OpenAPI as source of truth.
Schema
Short explanatory note
Keep exact request and response contracts in OpenAPI.
Request and response examples
Examples section
Remove secrets and private identifiers.
Error responses
Warnings and troubleshooting section
Explain user-facing impact.
Authentication
Boundary note
Do not copy tokens or private auth details into OKF.
Owner or support team
Owner notes
Add human review and escalation context.
Tags
OKF tags
Use a small, consistent tag set.
Many small operations
One concept file or section per durable business concept
Do not turn every endpoint into a thin OKF page.

Endpoint OKF example

OpenAPI endpoint context OKF
---
type: API Endpoint
title: Create customer endpoint
description: Explains endpoint purpose, owner notes, request context, response notes, and support warnings.
resource: https://openknowledgeformat.online/sample/openapi.yaml#/paths/~1customers/post
tags: [api, openapi, customers]
timestamp: 2026-06-21T00:00:00Z
---

# Purpose

Explain the stable facts, boundaries, owner notes, and related links for this concept.

# Links

- Validator: https://openknowledgeformat.online/okf-validator/
- Examples: https://openknowledgeformat.online/okf-examples/

Convert one API area first

  1. Pick one stable endpoint or API area.
  2. Link the OpenAPI file or API reference as the resource.
  3. Write the endpoint purpose in normal language.
  4. Add examples, limits, warnings, owner notes, and related docs.
  5. Validate the file with the OKF Validator.
  6. Validate the API bundle with the OKF Folder Validator.

What must stay in OpenAPI

Review boundaries

Generated API context remains pending until an owner reviews the contract link, examples, limits, and support notes. OKF does not validate OpenAPI schemas or replace contract tooling.

OpenAPI visual background

This video is included as visual background for OpenAPI context. It is not evidence that automatic OpenAPI to OKF conversion is accurate.

Watch video

Load the embedded video only when needed.

Visual background only; not used as proof for OpenAPI to OKF conversion. Watch the OpenAPI background video on YouTube

Read OKF vs OpenAPI when you need the difference between contract validation and knowledge context.

FAQ

Common questions

Can OKF replace OpenAPI?

No. OpenAPI remains the API contract. OKF adds context around that contract.

Can I generate OKF drafts from OpenAPI?

Yes, but owner notes, warnings, examples, and support rules still need human review.

Does OKF validate schemas?

No. Use OpenAPI tooling for schema and contract validation.

What should never move into OKF?

Do not move tokens, private request bodies, customer data, or exact schemas that must stay controlled by the OpenAPI contract.

Related pages

OKF vs OpenAPI

Compare contracts and context.

Open page

Create OKF for API Docs

Plan a broader API documentation bundle.

Open page

OKF Validator

Check one API context file.

Open page

API OKF template

Copy an endpoint context pattern.

Open page

OKF Templates

Browse other reviewed starter patterns.

Open page

OKF Folder Validator

Check API context bundles.

Open page

Convert one endpoint first

Start with one stable endpoint, validate it, then expand the API context bundle.

Open API OKF Template