opensource (empty) → 0.1.0.0
raw patch · 6 files changed
+226/−0 lines, 6 filesdep +aesondep +basedep +bytestringsetup-changed
Dependencies added: aeson, base, bytestring, http-client, http-client-tls, opensource, tasty, tasty-hunit, text, transformers, transformers-compat
Files
- LICENSE +20/−0
- Network/Protocol/OpenSource/License.hs +109/−0
- Setup.hs +2/−0
- opensource.cabal +62/−0
- tests/data/licenses.json +1/−0
- tests/suite.hs +32/−0
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2016 Clint Adams++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ Network/Protocol/OpenSource/License.hs view
@@ -0,0 +1,109 @@+{- Haskell code for accessing OSI license API++Copyright © 2016 Clint Adams++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE+-}++{-# LANGUAGE TemplateHaskell #-}++module Network.Protocol.OpenSource.License (+ OSIIdentifier(..)+ , OSILink(..)+ , OSIOtherName(..)+ , OSIText(..)+ , OSILicense(..)+ , allLicenses+ , licensesMatchingKeyword+ , licenseById+ , licenseBySchemeAndIdentifier+) where++import Control.Monad.Trans.Except (ExceptT(..))+import Data.Aeson (eitherDecode)+import Data.Aeson.TH (defaultOptions, deriveJSON, Options(..))+import Data.Char (toLower)+import Data.Text (Text)+import Network.HTTP.Client (httpLbs, newManager, parseUrl, responseBody)+import Network.HTTP.Client.TLS (tlsManagerSettings)++data OSIIdentifier = OSIIdentifier {+ oiIdentifier :: Text+ , oiScheme :: Text+} deriving (Eq, Read, Show)+$(deriveJSON defaultOptions{fieldLabelModifier = (map toLower . drop 2), constructorTagModifier = map toLower} ''OSIIdentifier)++data OSILink = OSILink {+ olNote :: Text+ , olUrl :: Text+} deriving (Eq, Read, Show)+$(deriveJSON defaultOptions{fieldLabelModifier = (map toLower . drop 2), constructorTagModifier = map toLower} ''OSILink)++data OSIOtherName = OSIOtherName {+ oonName :: Text+ , oonNote :: Maybe Text+} deriving (Eq, Read, Show)+$(deriveJSON defaultOptions{fieldLabelModifier = (map toLower . drop 3), constructorTagModifier = map toLower} ''OSIOtherName)++data OSIText = OSIText {+ otMedia_type :: Text+ , otTitle :: Text+ , otURL :: Text+} deriving (Eq, Read, Show)+$(deriveJSON defaultOptions{fieldLabelModifier = (map toLower . drop 2), constructorTagModifier = map toLower} ''OSIText)++data OSILicense = OSILicense {+ olId :: Text+ , olName :: Text+ , olSuperseded_by :: Maybe Text+ , olKeywords :: [Text]+ , olIdentifiers :: [OSIIdentifier]+ , olLinks :: [OSILink]+ , olOther_names :: [OSIOtherName]+ , olText :: [OSIText]+} deriving (Eq, Read, Show)+$(deriveJSON defaultOptions{fieldLabelModifier = (map toLower . drop 2), constructorTagModifier = map toLower} ''OSILicense)++getLicenses :: String -> ExceptT String IO [OSILicense]+getLicenses k = ExceptT $ do+ manager <- newManager tlsManagerSettings+ request <- parseUrl $ "https://api.opensource.org/licenses/" ++ k+ response <- httpLbs request manager++ return . eitherDecode . responseBody $ response++allLicenses :: ExceptT String IO [OSILicense]+allLicenses = getLicenses ""++licensesMatchingKeyword :: String -> ExceptT String IO [OSILicense]+licensesMatchingKeyword = getLicenses++getLicense :: String -> ExceptT String IO OSILicense+getLicense k = ExceptT $ do+ manager <- newManager tlsManagerSettings+ request <- parseUrl $ "https://api.opensource.org/license/" ++ k+ response <- httpLbs request manager++ return . eitherDecode . responseBody $ response++licenseById :: String -> ExceptT String IO OSILicense+licenseById = getLicense++licenseBySchemeAndIdentifier :: String -> String -> ExceptT String IO OSILicense+licenseBySchemeAndIdentifier s i = getLicense (concat [s, "/", i])
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ opensource.cabal view
@@ -0,0 +1,62 @@+name: opensource+version: 0.1.0.0+synopsis: Haskell API Wrapper for the Open Source License API+description: The Open Source API contains metadata regarding OSI Approved Licenses, and crosswalks that help with using and integrating this information with external sources. This library is designed to interact with that API so that users can simply build applications that are license-aware.+homepage: https://api.opensource.org/+license: MIT+license-file: LICENSE+author: Clint Adams+maintainer: Clint Adams <clint@debian.org>+copyright: 2016 Clint Adams+category: Network+build-type: Simple+cabal-version: >=1.10+extra-source-files: tests/data/licenses.json++flag transformers_compat+ default: False+ description: use transformers-compat to get ExceptT++library+ exposed-modules: Network.Protocol.OpenSource.License+ build-depends:+ base >=4.4 && <5+ , aeson+ , http-client+ , http-client-tls+ , text+ default-language: Haskell2010+ if flag(transformers_compat)+ build-depends:+ transformers > 0.2+ , transformers-compat > 0.3+ else+ build-depends:+ transformers > 0.3++test-suite tests+ type: exitcode-stdio-1.0+ main-is: tests/suite.hs+ ghc-options: -Wall+ build-depends:+ base >=4.4 && <5+ , opensource+ , aeson+ , bytestring+ , http-client+ , http-client-tls+ , text+ , tasty+ , tasty-hunit+ default-language: Haskell2010+ if flag(transformers_compat)+ build-depends:+ transformers > 0.2+ , transformers-compat > 0.3+ else+ build-depends:+ transformers > 0.3++source-repository head+ type: git+ location: https://github.com/OpenSourceOrg/haskell-opensource.git
+ tests/data/licenses.json view
@@ -0,0 +1,1 @@+[{"id":"AAL","identifiers":[{"identifier":"AAL","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/AAL"}],"name":"Attribution Assurance License","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/AAL"}]},{"id":"AFL-3.0","identifiers":[{"identifier":"AFL-3.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/AFL-3.0"}],"name":"Academic Free License, Version 3.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/AFL-3.0"}]},{"id":"AGPL-3.0","identifiers":[{"identifier":"AGPL-3.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/AGPL-3.0"}],"name":"GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPL-3.0)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/AGPL-3.0"}]},{"id":"APL-1.0","identifiers":[{"identifier":"APL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/APL-1.0"}],"name":"Adaptive Public License, Version 1.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","miscellaneous"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/APL-1.0"}]},{"id":"APSL-2.0","identifiers":[{"identifier":"APSL-2.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/APSL-2.0"}],"name":"Apple Public Source License, Version 2.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/APSL-2.0"}]},{"id":"Apache-1.1","identifiers":[{"identifier":"Apache-1.1","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Apache-1.1"}],"name":"Apache Software License, Version 1.1","other_names":[],"superseded_by":"Apache-2.0","keywords":["discouraged","obsolete","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Apache-1.1"}]},{"id":"Apache-2.0","identifiers":[{"identifier":"Apache-2.0","scheme":"DEP5"},{"identifier":"Apache-2.0","scheme":"SPDX"}],"links":[{"note":"tl;dr legal","url":"https://tldrlegal.com/license/apache-license-2.0-%28apache-2.0%29"},{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/Apache_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/Apache-2.0"}],"name":"Apache License, Version 2.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","popular","permissive"],"text":[{"media_type":"text/html","title":"HTML","url":"https://www.apache.org/licenses/LICENSE-2.0"}]},{"id":"Artistic-1.0","identifiers":[{"identifier":"Artistic-1.0","scheme":"DEP5"},{"identifier":"Artistic-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Artistic-1.0"}],"name":"Artistic License, Version 1.0","other_names":[],"superseded_by":"Artistic-2.0","keywords":["osi-approved","discouraged","obsolete"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Artistic-1.0"}]},{"id":"Artistic-2.0","identifiers":[{"identifier":"Artistic-2.0","scheme":"DEP5"},{"identifier":"Artistic-2.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Artistic-2.0"}],"name":"Artistic License, Version 2.0","other_names":[],"superseded_by":null,"keywords":["miscellaneous","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Artistic-2.0"}]},{"id":"BSD-2","identifiers":[{"identifier":"BSD-2-clause","scheme":"DEP5"},{"identifier":"BSD-2-Clause","scheme":"SPDX"}],"links":[{"note":"Wikipedia Page","url":"https://en.wikipedia.org/wiki/BSD_licenses#2-clause"},{"note":"OSI Page","url":"https://opensource.org/licenses/BSD-2-Clause"}],"name":"BSD 2-Clause License","other_names":[{"name":"Simplified BSD License","note":null},{"name":"FreeBSD License","note":null}],"superseded_by":null,"keywords":["osi-approved","popular","permissive"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/BSD-2-Clause"}]},{"id":"BSD-3","identifiers":[{"identifier":"BSD-3-clause","scheme":"DEP5"},{"identifier":"BSD-3-Clause","scheme":"SPDX"}],"links":[{"note":"Wikipedia Page","url":"https://en.wikipedia.org/wiki/BSD_licenses#3-clause"},{"note":"OSI Page","url":"https://opensource.org/licenses/BSD-3-Clause"}],"name":"BSD 3-Clause License","other_names":[{"name":"Revised BSD License","note":null},{"name":"Modified BSD License","note":null},{"name":"New BSD License","note":null}],"superseded_by":null,"keywords":["osi-approved","popular","permissive"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/BSD-3-Clause"}]},{"id":"BSD-4","identifiers":[{"identifier":"BSD-4-clause","scheme":"DEP5"},{"identifier":"BSD-4-Clause","scheme":"SPDX"}],"links":[{"note":"Wikipedia Page","url":"https://en.wikipedia.org/wiki/BSD_licenses#4-clause"},{"note":"OSI Page","url":"https://opensource.org/licenses/BSD-4-Clause"}],"name":"BSD 4-Clause License","other_names":[{"name":"Original BSD License","note":null}],"superseded_by":null,"keywords":["osi-approved","permissive"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/BSD-4-Clause"}]},{"id":"BSL-1.0","identifiers":[{"identifier":"BSL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/BSL-1.0"}],"name":"Boost Software License 1.0 (BSL-1.0)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/BSL-1.0"}]},{"id":"CATOSL-1.1","identifiers":[{"identifier":"CATOSL-1.1","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/CATOSL-1.1"}],"name":"Computer Associates Trusted Open Source License, Version 1.1","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/CATOSL-1.1"}]},{"id":"CDDL-1.0","identifiers":[{"identifier":"CDDL-1.0","scheme":"DEP5"},{"identifier":"CDDL-1.0","scheme":"SPDX"}],"links":[{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/Common_Development_and_Distribution_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/CDDL-1.0"}],"name":"Common Development and Distribution License, Version 1.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","popular"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/CDDL-1.0"}]},{"id":"CECILL-2.1","identifiers":[],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/CECILL-2.1"}],"name":"Cea Cnrs Inria Logiciel Libre License, Version 2.1","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/CECILL-2.1"}]},{"id":"CNRI-Python","identifiers":[{"identifier":"CNRI-Python","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/CNRI-Python"}],"name":"CNRI portion of the multi-part Python License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/CNRI-Python"}]},{"id":"CPAL-1.0","identifiers":[{"identifier":"CPAL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/CPAL-1.0"}],"name":"Common Public Attribution License Version 1.0 (CPAL-1.0)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/CPAL-1.0"}]},{"id":"CPL-1.0","identifiers":[{"identifier":"CPL","scheme":"DEP5"},{"identifier":"CPL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/CPL-1.0"}],"name":"Common Public License, Version 1.0","other_names":[],"superseded_by":"EPL-1.0","keywords":["discouraged","obsolete","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/CPL-1.0"}]},{"id":"CUA-OPL-1.0","identifiers":[{"identifier":"CUA-OPL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/CUA-OPL-1.0"}],"name":"CUA Office Public License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/CUA-OPL-1.0"}]},{"id":"CVW","identifiers":[],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/CVW"}],"name":"The MITRE Collaborative Virtual Workspace License","other_names":[],"superseded_by":null,"keywords":["discouraged","retired","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/CVW"}]},{"id":"ECL-1.0","identifiers":[{"identifier":"ECL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/ECL-1.0"}],"name":"Educational Community License, Version 1.0","other_names":[],"superseded_by":"ECL-2.0","keywords":["discouraged","obsolete","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/ECL-1.0"}]},{"id":"ECL-2.0","identifiers":[{"identifier":"ECL-2.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/ECL-2.0"}],"name":"Educational Community License, Version 2.0","other_names":[],"superseded_by":null,"keywords":["special-purpose","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/ECL-2.0"}]},{"id":"EFL-1.0","identifiers":[{"identifier":"EFL-1.0","scheme":"DEP5"},{"identifier":"EFL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/EFL-1.0"}],"name":"The Eiffel Forum License, Version 1","other_names":[],"superseded_by":"EFL-2.0","keywords":["osi-approved","discouraged","obsolete"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/EFL-1.0"}]},{"id":"EFL-2.0","identifiers":[{"identifier":"EFL-2.0","scheme":"DEP5"},{"identifier":"EFL-2.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/EFL-2.0"}],"name":"Eiffel Forum License, Version 2","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/EFL-2.0"}]},{"id":"EPL-1.0","identifiers":[{"identifier":"EPL-1.0","scheme":"SPDX"}],"links":[{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/Eclipse_Public_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/EPL-1.0"}],"name":"Eclipse Public License, Version 1.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","popular"],"text":[{"media_type":"text/html","title":"HTML","url":"https://www.eclipse.org/legal/epl-v10.html"}]},{"id":"EUDatagrid","identifiers":[{"identifier":"EUDatagrid","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/EUDatagrid"}],"name":"EU DataGrid Software License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/EUDatagrid"}]},{"id":"EUPL-1.1","identifiers":[{"identifier":"EUPL-1.1","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/EUPL-1.1"}],"name":"European Union Public License, Version 1.1","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/EUPL-1.1"}]},{"id":"Entessa","identifiers":[{"identifier":"Entessa","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Entessa"}],"name":"Entessa Public License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Entessa"}]},{"id":"Expat","identifiers":[{"identifier":"Expat","scheme":"DEP5"},{"identifier":"Expat","scheme":"DEP5"},{"identifier":"MIT","scheme":"SPDX"}],"links":[{"note":"tl;dr legal","url":"https://tldrlegal.com/license/mit-license"},{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/MIT_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/mit"}],"name":"MIT/Expat License","other_names":[{"name":"MIT","note":"Because MIT has used many licenses for software, the Free Software Foundation considers MIT License ambiguous. The MIT License published on the OSI site is the same as the Expat License."},{"name":"Expat","note":"Because MIT has used many licenses for software, the Free Software Foundation considers MIT License ambiguous. The MIT License published on the OSI site is the same as the Expat License."}],"superseded_by":null,"keywords":["osi-approved","popular","permissive"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/mit"}]},{"id":"Fair","identifiers":[{"identifier":"Fair","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Fair"}],"name":"Fair License (Fair)","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Fair"}]},{"id":"Frameworx-1.0","identifiers":[{"identifier":"Frameworx-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Frameworx-1.0"}],"name":"Frameworx License, Version 1.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Frameworx-1.0"}]},{"id":"GPL-2.0","identifiers":[{"identifier":"GPL-2.0","scheme":"DEP5"},{"identifier":"GPL-2.0","scheme":"SPDX"}],"links":[{"note":"tl;dr legal","url":"https://tldrlegal.com/license/gnu-general-public-license-v2"},{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/GNU_General_Public_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/GPL-2.0"}],"name":"GNU General Public License, Version 2.0","other_names":[],"superseded_by":"GPL-3.0","keywords":["osi-approved","popular","copyleft"],"text":[{"media_type":"text/plain","title":"Plain Text","url":"https://www.gnu.org/licenses/gpl-2.0.txt"},{"media_type":"text/html","title":"HTML","url":"https://www.gnu.org/licenses/gpl-2.0-standalone.html"}]},{"id":"GPL-3.0","identifiers":[{"identifier":"GPL-3.0","scheme":"DEP5"},{"identifier":"GPL-3.0","scheme":"SPDX"}],"links":[{"note":"tl;dr legal","url":"https://tldrlegal.com/license/gnu-general-public-license-v3-%28gpl-3%29"},{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/GNU_General_Public_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/GPL-3.0"}],"name":"GNU General Public License, Version 3.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","popular","copyleft"],"text":[{"media_type":"text/plain","title":"Plain Text","url":"https://www.gnu.org/licenses/gpl-3.0.txt"},{"media_type":"text/html","title":"HTML","url":"https://www.gnu.org/licenses/gpl-3.0-standalone.html"}]},{"id":"HPND","identifiers":[{"identifier":"HPND","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/HPND"}],"name":"Historical Permission Notice and Disclaimer","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/HPND"}]},{"id":"IPA","identifiers":[{"identifier":"IPA","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/IPA"}],"name":"IPA Font License","other_names":[],"superseded_by":null,"keywords":["osi-approved","special-purpose"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/IPA"}]},{"id":"IPL-1.0","identifiers":[{"identifier":"IPL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/IPL-1.0"}],"name":"IBM Public License, Version 1.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/IPL-1.0"}]},{"id":"ISC","identifiers":[{"identifier":"ISC","scheme":"DEP5"},{"identifier":"ISC","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/ISC"}],"name":"ISC License (ISC)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/ISC"}]},{"id":"Intel","identifiers":[{"identifier":"Intel","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Intel"}],"name":"The Intel Open Source License","other_names":[],"superseded_by":null,"keywords":["discouraged","retired","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Intel"}]},{"id":"LGPL-2.1","identifiers":[{"identifier":"LGPL-2.1","scheme":"DEP5"},{"identifier":"LGPL-2.1","scheme":"SPDX"}],"links":[{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/LGPL-2.1"}],"name":"GNU Lesser General Public License, Version 2.1","other_names":[],"superseded_by":"LGPL-3.0","keywords":["osi-approved","popular","copyleft"],"text":[{"media_type":"text/plain","title":"Plain Text","url":"https://www.gnu.org/licenses/lgpl-2.1.txt"},{"media_type":"text/html","title":"HTML","url":"https://www.gnu.org/licenses/lgpl-2.1-standalone.html"}]},{"id":"LGPL-3.0","identifiers":[{"identifier":"LGPL-3.0","scheme":"DEP5"},{"identifier":"LGPL-3.0","scheme":"SPDX"}],"links":[{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/LGPL-3.0"}],"name":"GNU Lesser General Public License, Version 3.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","popular","copyleft"],"text":[{"media_type":"text/plain","title":"Plain Text","url":"https://www.gnu.org/licenses/lgpl-3.0.txt"},{"media_type":"text/html","title":"HTML","url":"https://www.gnu.org/licenses/lgpl-3.0-standalone.html"}]},{"id":"LPL-1.0","identifiers":[{"identifier":"LPL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/LPL-1.0"}],"name":"Lucent Public License, Plan 9, Version 1.0","other_names":[],"superseded_by":"LPL-1.02","keywords":["osi-approved","discouraged","obsolete"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/LPL-1.0"}]},{"id":"LPL-1.02","identifiers":[{"identifier":"LPL-1.02","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/LPL-1.02"}],"name":"Lucent Public License, Version 1.02","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/LPL-1.02"}]},{"id":"LPPL-1.3c","identifiers":[{"identifier":"LPPL-1.3c","scheme":"DEP5"},{"identifier":"LPPL-1.3c","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/LPPL-1.3c"}],"name":"LaTeX Project Public License, Version 1.3c","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/LPPL-1.3c"}]},{"id":"LiLiQ-P-1.1","identifiers":[],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/LiLiQ-P-1.1"}],"name":"Licence Libre du Québec – Permissive, Version 1.1","other_names":[],"superseded_by":null,"keywords":["osi-approved","international","permissive"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/LiLiQ-P-1.1"}]},{"id":"LiLiQ-R+","identifiers":[],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/LiLiQ-Rplus-1.1"}],"name":"Licence Libre du Québec – Réciprocité forte, Version 1.1","other_names":[],"superseded_by":null,"keywords":["international","osi-approved","copyleft"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/LiLiQ-Rplus-1.1"}]},{"id":"LiLiQ-R-1.1","identifiers":[],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/LiLiQ-R-1.1"}],"name":"Licence Libre du Québec – Réciprocité, Version 1.1","other_names":[],"superseded_by":null,"keywords":["international","osi-approved","copyleft"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/LiLiQ-R-1.1"}]},{"id":"MPL-1.0","identifiers":[{"identifier":"MPL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/MPL-1.0"}],"name":"Mozilla Public License, Version 1.0","other_names":[],"superseded_by":"MPL-2.0","keywords":["osi-approved","discouraged","obsolete"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/MPL-1.0"}]},{"id":"MPL-1.1","identifiers":[{"identifier":"MPL-1.1","scheme":"DEP5"},{"identifier":"MPL-1.1","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/MPL-1.1"}],"name":"Mozilla Public License, Version 1.1","other_names":[],"superseded_by":"MPL-2.0","keywords":["osi-approved","discouraged","obsolete"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/MPL-1.1"}]},{"id":"MPL-2.0","identifiers":[{"identifier":"MPL-2.0","scheme":"SPDX"}],"links":[{"note":"Wikipedia page","url":"https://en.wikipedia.org/wiki/MPL_License"},{"note":"OSI Page","url":"https://opensource.org/licenses/MPL-2.0"},{"note":"Mozilla Page","url":"https://www.mozilla.org/en-US/MPL/"}],"name":"Mozilla Public License, Version 2.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","popular","copyleft"],"text":[{"media_type":"text/html","title":"HTML","url":"https://www.mozilla.org/en-US/MPL/2.0/"}]},{"id":"MS-PL","identifiers":[{"identifier":"MS-PL","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/MS-PL"}],"name":"Microsoft Public License (MS-PL)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/MS-PL"}]},{"id":"MS-RL","identifiers":[{"identifier":"MS-RL","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/MS-RL"}],"name":"Microsoft Reciprocal License (MS-RL)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/MS-RL"}]},{"id":"MirOS","identifiers":[{"identifier":"MirOS","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/MirOS"}],"name":"MirOS License (MirOS)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/MirOS"}]},{"id":"Motosoto","identifiers":[{"identifier":"Motosoto","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Motosoto"}],"name":"Motosoto Open Source License, Version 0.9.1","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Motosoto"}]},{"id":"Multics","identifiers":[{"identifier":"Multics","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Multics"}],"name":"Multics License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Multics"}]},{"id":"NASA-1.3","identifiers":[{"identifier":"NASA-1.3","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/NASA-1.3"}],"name":"NASA Open Source Agreement, Version 1.3","other_names":[],"superseded_by":null,"keywords":["osi-approved","special-purpose"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/NASA-1.3"}]},{"id":"NCSA","identifiers":[{"identifier":"NCSA","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/NCSA"}],"name":"The University of Illinois/NCSA Open Source License","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/NCSA"}]},{"id":"NGPL","identifiers":[{"identifier":"NGPL","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/NGPL"}],"name":"The Nethack General Public License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/NGPL"}]},{"id":"NPOSL-3.0","identifiers":[{"identifier":"NPOSL-3.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/NPOSL-3.0"}],"name":"The Non-Profit Open Software License, Version 3.0","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/NPOSL-3.0"}]},{"id":"NTP","identifiers":[{"identifier":"NTP","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/NTP"}],"name":"NTP License (NTP)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/NTP"}]},{"id":"Naumen","identifiers":[{"identifier":"Naumen","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Naumen"}],"name":"NAUMEN Public License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Naumen"}]},{"id":"Nokia","identifiers":[{"identifier":"Nokia","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Nokia"}],"name":"Nokia Open Source License, Version 1.0a","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Nokia"}]},{"id":"OCLC-2.0","identifiers":[{"identifier":"OCLC-2.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/OCLC-2.0"}],"name":"The OCLC Research Public License, Version 2.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/OCLC-2.0"}]},{"id":"OFL-1.1","identifiers":[{"identifier":"OFL-1.1","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/OFL-1.1"}],"name":"SIL Open Font License, Version 1.1","other_names":[],"superseded_by":null,"keywords":["osi-approved","special-purpose"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/OFL-1.1"}]},{"id":"OGTSL","identifiers":[{"identifier":"OGTSL","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/OGTSL"}],"name":"The Open Group Test Suite License (OGTSL)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/OGTSL"}]},{"id":"OPL-2.1","identifiers":[],"links":[{"note":"OSET Foundation Page","url":"https://www.osetfoundation.org/public-license"}],"name":"OSET Foundation Public License","other_names":[],"superseded_by":null,"keywords":["osi-approved","special-purpose"],"text":[{"media_type":"application/pdf","title":"PDF","url":"https://static1.squarespace.com/static/528d46a2e4b059766439fa8b/t/53236a37e4b0db70c9afdf14/1394829879761/OSETPublicLicense_v2.pdf"}]},{"id":"OSL-1.0","identifiers":[{"identifier":"OSL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/OSL-1.0"}],"name":"Open Software License, Version 1.0","other_names":[],"superseded_by":"OLS-3.0","keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/OSL-1.0"}]},{"id":"OSL-2.1","identifiers":[{"identifier":"OSL-2.1","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/OSL-2.1"}],"name":"Open Software License, Version 2.1","other_names":[],"superseded_by":"OLS-3.0","keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/OSL-2.1"}]},{"id":"OSL-3.0","identifiers":[{"identifier":"OSL-3.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/OSL-3.0"}],"name":"Open Software License, Version 3.0","other_names":[],"superseded_by":null,"keywords":["osi-approved","miscellaneous"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/OSL-3.0"}]},{"id":"PHP-3.0","identifiers":[{"identifier":"PHP-3.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/PHP-3.0"}],"name":"The PHP License, Version 3.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/PHP-3.0"}]},{"id":"PostgreSQL","identifiers":[{"identifier":"PostgreSQL","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/PostgreSQL"}],"name":"The PostgreSQL Licence","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/PostgreSQL"}]},{"id":"Python-2.0","identifiers":[{"identifier":"Python-2.0","scheme":"DEP5"},{"identifier":"Python-2.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Python-2.0"}],"name":"Python License, Version 2.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Python-2.0"}]},{"id":"QPL-1.0","identifiers":[{"identifier":"QPL-1.0","scheme":"DEP5"},{"identifier":"QPL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/QPL-1.0"}],"name":"The Q Public License Version (QPL-1.0)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/QPL-1.0"}]},{"id":"RPL-1.1","identifiers":[{"identifier":"RPL-1.1","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/RPL-1.1"}],"name":"Reciprocal Public License, Version 1.1","other_names":[],"superseded_by":"RPL-1.5","keywords":["discouraged","obsolete","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/RPL-1.1"}]},{"id":"RPL-1.5","identifiers":[{"identifier":"RPL-1.5","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/RPL-1.5"}],"name":"Reciprocal Public License, Version 1.5","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/RPL-1.5"}]},{"id":"RPSL-1.0","identifiers":[{"identifier":"RPSL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/RPSL-1.0"}],"name":"RealNetworks Public Source License, Version 1.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/RPSL-1.0"}]},{"id":"RSCPL","identifiers":[{"identifier":"RSCPL","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/RSCPL"}],"name":"The Ricoh Source Code Public License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/RSCPL"}]},{"id":"SISSL","identifiers":[{"identifier":"SISSL","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/SISSL"}],"name":"Sun Industry Standards Source License","other_names":[],"superseded_by":null,"keywords":["discouraged","retired","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/SISSL"}]},{"id":"SPL-1.0","identifiers":[{"identifier":"SPL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/SPL-1.0"}],"name":"Sun Public License, Version 1.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/SPL-1.0"}]},{"id":"Simple-2.0","identifiers":[{"identifier":"SimPL-2.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Simple-2.0"}],"name":"Simple Public License (SimPL-2.0)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Simple-2.0"}]},{"id":"Sleepycat","identifiers":[{"identifier":"Sleepycat","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Sleepycat"}],"name":"The Sleepycat License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Sleepycat"}]},{"id":"UPL","identifiers":[],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/UPL"}],"name":"The Universal Permissive License (UPL), Version 1.0","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/UPL"}]},{"id":"VSL-1.0","identifiers":[{"identifier":"VSL-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/VSL-1.0"}],"name":"The Vovida Software License, Version 1.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/VSL-1.0"}]},{"id":"W3C","identifiers":[{"identifier":"W3C","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/W3C"}],"name":"The W3C Software Notice and License","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/W3C"}]},{"id":"WXwindows","identifiers":[{"identifier":"WXwindows","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/WXwindows"}],"name":"The wxWindows Library Licence","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/WXwindows"}]},{"id":"Watcom-1.0","identifiers":[{"identifier":"Watcom-1.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Watcom-1.0"}],"name":"The Sybase Open Source Licence","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Watcom-1.0"}]},{"id":"Xnet","identifiers":[{"identifier":"Xnet","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Xnet"}],"name":"The X.Net, Inc. License","other_names":[],"superseded_by":null,"keywords":["osi-approved","discouraged","redundant"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Xnet"}]},{"id":"ZPL-2.0","identifiers":[{"identifier":"Zope-2.0","scheme":"DEP5"},{"identifier":"ZPL-2.0","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/ZPL-2.0"}],"name":"The Zope Public License, Version 2.0","other_names":[],"superseded_by":null,"keywords":["discouraged","non-reusable","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/ZPL-2.0"}]},{"id":"Zlib","identifiers":[{"identifier":"Zlib","scheme":"DEP5"},{"identifier":"Zlib","scheme":"SPDX"}],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/Zlib"}],"name":"The zlib/libpng License (Zlib)","other_names":[],"superseded_by":null,"keywords":["osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/Zlib"}]},{"id":"jabberpl","identifiers":[],"links":[{"note":"OSI Page","url":"https://opensource.org/licenses/jabberpl"}],"name":"Jabber Open Source License","other_names":[],"superseded_by":null,"keywords":["discouraged","retired","osi-approved"],"text":[{"media_type":"text/html","title":"HTML","url":"https://opensource.org/licenses/jabberpl"}]}]
+ tests/suite.hs view
@@ -0,0 +1,32 @@+-- suite.hs: opensource library test suite+-- Copyright © 2016 Clint Adams+-- This software is released under the terms of the Expat license.+-- (See the LICENSE file).++import Test.Tasty (defaultMain, testGroup, TestTree)+import Test.Tasty.HUnit (testCase, Assertion, assertFailure, assertEqual)++import Network.Protocol.OpenSource.License (OSILicense)++import Data.Aeson (eitherDecode)+import qualified Data.ByteString.Lazy as BL++tests :: TestTree+tests = testGroup "Tests" [unitTests]++unitTests :: TestTree+unitTests = testGroup "Unit Tests" [+ testGroup "Serialization group" [+ testCase "Parse JSON" (testJSONInput 90 "licenses.json")+ ]+ ]++testJSONInput :: Int -> FilePath -> Assertion+testJSONInput count fp = do+ bs <- BL.readFile $ "tests/data/" ++ fp+ case eitherDecode bs :: Either String [OSILicense] of+ Left e -> assertFailure e+ Right j -> assertEqual ("List count matches " ++ show count) count (length j)++main :: IO ()+main = defaultMain tests