swagger: '2.0'info:description: >This API is for developers that want to add a plaintext license to theirproject but don't want to manually search the web for a copy.All API responses are strings, to make consuming the API via terminal orconsole simple.version: 1.0.0title: Open Source Software License APIhost: 'http://YOUR_WEBSITE.tld'basePath: /schemes:- httppaths:/api:get:tags:- Listsummary: List all available endpointsdescription: Returns a list of available endpointsproduces:- text/plainresponses:'200':description: Successful operationschema:$ref: '#/definitions/Endpoints'examples:text/plain: |===============================================================Available Endpoints===============================================================Endpoint: /api/Description: List all available endpoints-Endpoint: /api/listDescription: List all available open source licenses by id==============================================================='503':description: Service unavailableschema:$ref: '#/definitions/ErrorResponse'examples:text/plain: >ERROR - Endpoint list not found! Contact the site administrator ifthe problem persists./api/list:get:tags:- Listsummary: List IDs of all available licensesdescription: >-Returns a list of available license IDs. Limited to **5** licenses perrow for readability.produces:- text/plainresponses:'200':description: Successful operationschema:$ref: '#/definitions/LicensesShort'examples:text/plain: |gpl-2.0, gpl-3.0, isc'503':description: Service unavailableschema:$ref: '#/definitions/ErrorResponse'examples:text/plain: >ERROR - License database not found! Contact the site administratorif the problem persists./api/list/full:get:tags:- Listsummary: List IDs and names of all available licensesdescription: Returns a detailed list of available licensesproduces:- text/plainresponses:'200':description: Successful operationschema:$ref: '#/definitions/LicensesDetailed'examples:text/plain: |gpl-2.0 GNU General Public License v2.0gpl-3.0 GNU General Public License v3.0isc ISC License'503':description: Service unavailableschema:$ref: '#/definitions/ErrorResponse'examples:text/plain: >ERROR - License database not found! Contact the site administratorif the problem persists.'/api/{license}':get:tags:- Licensesummary: Retrieve a license using its IDdescription: Returns a single license using its IDproduces:- text/plainparameters:- name: licensein: pathdescription: The name of the license to retrieverequired: truetype: stringformat: stringresponses:'200':description: Successful operationschema:$ref: '#/definitions/LicenseText'examples:text/plain: >ISC LicenseCopyright (c) [year], [fullname]Permission to use, copy, modify, and/or distribute this softwarefor any purpose with or without fee is hereby granted, providedthat the above copyright notice and this permission notice appearin all copies.THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALLWARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THEAUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, ORCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROMLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR INCONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.'404':description: Not foundschema:$ref: '#/definitions/ErrorResponse'examples:text/plain: >ERROR - NonExistentLicense is undefined. Use the 'list' endpointto see defined license types.definitions:Endpoints:type: stringLicensesShort:type: stringLicensesDetailed:type: stringLicenseText:type: stringErrorResponse:type: string