OpenAPI Spec: what is suitable license for a private and internal OpenAPI doc?

1.9k Views Asked by At

My company uses Open API Spec to organize the doc for internal APIs and render it through UI tools, for example, redoc.ly or Swagger. The API doc is managed as a private git repo and will never be released to the public.

License for private API doc

Swagger has provided good examples for open-source projects, for example, MIT, GPL, "Apache 2.0", but the private API doc seems not covered.

https://spec.openapis.org/oas/latest.html#license-object

{
  "name": "Apache 2.0",
  "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}

Investigation

I saw some people specify their license in this way.

  license:
    - name: unlicensed
    - url: "www.example.com"

Questions

What is the suitable license for the private API documentation project?

How do you usually represent the license object in your private Open API doc?

1

There are 1 best solutions below

0
On

The OpenAPI info object supports a termsOfService property which takes a URL link to the terms.

info:
  termsOfService: https://example.com/terms

I like to use that for these cases.