OAI / OAI/OpenAPI-Specification

Clarification on the purpose of the API license?

Open
#726 18 comments 9 reactions 1 assignee View on GitHub

@lornajane is already working on this.

Since Jul 2, 2026.

clarification editorial review
Dominant language
Markdown
Stars
31.2k
Forks
9.2k
Avg merge
6h 37m
Merged PRs (30d)
27

Description

In the Swagger 2.0 specification, there is support for adding a License as one of the informational fields and the description for this is License information for the exposed API.

This seems a bit ambiguous, since a license could potentially be understood to apply to one or more of the following contexts:

  1. Use of the API. This situation seems to be already handled by the termsOfService section though.
  2. Data retrieved from the API
  3. The specification JSON/YAML for the API indeed, there is a license for the Swagger 2 specification
  4. Client/server code generated via swagger-codegen could some licenses theoretically extend to that?

I am guessing that the item 3 is the intended use for the license field, but I will admit that at first I thought it was meant for the first case and I could not see how a license would actually apply. Is it possible to get some clarification of how licenses should be picked here and where they do and do not apply?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.