2

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?

Ryan Lyu
  • 4,180
  • 5
  • 35
  • 51

1 Answers1

0

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.

Domino
  • 361
  • 1
  • 2
  • 7