Skip to content

Commit

Permalink
Add 'License' message to the annotation proto.
Browse files Browse the repository at this point in the history
This information is used by the default html doc generator and so it is nice
to be able to provide it.
  • Loading branch information
ensonic committed May 8, 2018
1 parent 2dc0f3e commit cfb5bf6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions protoc-gen-swagger/options/openapiv2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ message Info {
string description = 2;
string terms_of_service = 3;
Contact contact = 4;
// field 5 is reserved for 'license'.
reserved 5;
License license=5;
string version = 6;
}

Expand All @@ -90,6 +89,17 @@ message Contact {
string email = 3;
}

// `License` is a representation of OpenAPI v2 specification's License object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
//
message License {
// Required. The license name used for the API.
string name = 1;
// A URL to the license used for the API.
string url = 2;
}

// `ExternalDocumentation` is a representation of OpenAPI v2 specification's
// ExternalDocumentation object.
//
Expand Down

0 comments on commit cfb5bf6

Please sign in to comment.