diff --git a/packages/controller/io-package.json b/packages/controller/io-package.json index b29015853b..b3b8dc623d 100644 --- a/packages/controller/io-package.json +++ b/packages/controller/io-package.json @@ -115,6 +115,10 @@ "hobbyquaker ", "Apollon77 " ], + "licenseInformation": { + "license": "MIT", + "type": "free" + }, "license": "MIT", "type": "general", "unsafePerm": true, diff --git a/packages/types-dev/objects.d.ts b/packages/types-dev/objects.d.ts index 2cfb34a6a3..1b7966a0c4 100644 --- a/packages/types-dev/objects.d.ts +++ b/packages/types-dev/objects.d.ts @@ -501,6 +501,28 @@ declare global { ignoreInVersions: number[]; } + type PaidLicenseType = 'paid' | 'commercial' | 'limited'; + + interface LicenseInformationFree { + /** License of the software */ + license?: string; + /** Use 'paid' for adapters which do not work without a paid license. Use 'commercial' for adapters which require a license for commercial use only. Use 'limited' if some functionalities are not available without a paid license. */ + type: 'free'; + /** Hyperlink, where information about the license can be found. This is required if the license type is different from 'free'. */ + link?: string; + } + + interface LicenseInformationWithPayment { + /** License of the software */ + license?: string; + /** Use 'paid' for adapters which do not work without a paid license. Use 'commercial' for adapters which require a license for commercial use only. Use 'limited' if some functionalities are not available without a paid license. */ + type: PaidLicenseType; + /** Hyperlink, where information about the license can be found. This is required if the license type is different from 'free'. */ + link: string; + } + + type LicenseInformation = LicenseInformationFree | LicenseInformationWithPayment; + interface AdapterCommon extends ObjectCommon { /** Custom attributes to be shown in admin in the object browser */ adminColumns?: any[]; @@ -649,6 +671,10 @@ declare global { /** A list of pages that should be shown on the ioBroker cloud index page */ welcomeScreenPro?: WelcomeScreenEntry[]; wwwDontUpload?: boolean; + /** @deprecated Use 'common.licenseInformation' instead */ + license?: string; + /** An object representing information with the license details */ + licenseInformation?: LicenseInformation; // Make it possible to narrow the object type using the custom property custom?: undefined; diff --git a/packages/types-public/index.test-d.ts b/packages/types-public/index.test-d.ts index 48c8c68770..3e8e3c5bb7 100644 --- a/packages/types-public/index.test-d.ts +++ b/packages/types-public/index.test-d.ts @@ -797,6 +797,14 @@ const _adapterObject: ioBroker.AdapterObject = { objects: [] }; +if (_adapterObject.common.licenseInformation && _adapterObject.common.licenseInformation.type === 'paid') { + // for non-free licenses link is non optional + _adapterObject.common.licenseInformation.link.includes('https://'); +} else { + // @ts-expect-error link is optional on free license + _adapterObject.common.licenseInformation.link.includes('https://'); +} + const _folderObject: ioBroker.FolderObject = { _id: '', type: 'folder', diff --git a/schemas/io-package.json b/schemas/io-package.json index 8fedf55401..92865d6d84 100644 --- a/schemas/io-package.json +++ b/schemas/io-package.json @@ -47,6 +47,579 @@ "nodeProcessParams" ] } + }, + "license": { + "description": "The license this software is published under.", + "type": "string", + "enum": [ + "Qhull", + "NOSL", + "CC-BY-ND-2.5", + "O-UDA-1.0", + "DRL-1.0", + "ImageMagick", + "mpich2", + "CC-BY-SA-4.0", + "SPL-1.0", + "McPhee-slideshow", + "MIT-enna", + "OSL-2.1", + "GFDL-1.2-or-later", + "BSD-3-Clause-LBNL", + "OFL-1.0-RFN", + "Watcom-1.0", + "MPL-1.0", + "Aladdin", + "etalab-2.0", + "copyleft-next-0.3.0", + "NLPL", + "mplus", + "ECL-1.0", + "fwlw", + "BlueOak-1.0.0", + "JPNIC", + "AFL-3.0", + "CC-BY-NC-SA-2.0-FR", + "GFDL-1.3-invariants-or-later", + "CFITSIO", + "GPL-1.0-only", + "XSkat", + "CC-BY-ND-2.0", + "CC-BY-SA-3.0-IGO", + "CC-BY-3.0-NL", + "FSFUL", + "HPND-export-US", + "CATOSL-1.1", + "ZPL-2.1", + "CC-BY-NC-SA-2.0-DE", + "OGL-UK-1.0", + "BSD-3-Clause-No-Nuclear-Warranty", + "TU-Berlin-2.0", + "Saxpath", + "ZPL-2.0", + "Bitstream-Charter", + "OpenSSL", + "ClArtistic", + "MPL-2.0-no-copyleft-exception", + "X11", + "FSFULLR", + "CC-BY-4.0", + "CC-BY-SA-3.0-DE", + "CC-BY-SA-2.5", + "MPEG-SSG", + "LPPL-1.0", + "FreeImage", + "CERN-OHL-1.2", + "Artistic-1.0-cl8", + "LZMA-SDK-9.22", + "BSD-3-Clause-No-Nuclear-License-2014", + "CC-BY-ND-3.0-DE", + "Afmparse", + "CERN-OHL-S-2.0", + "DOC", + "GL2PS", + "YPL-1.1", + "GFDL-1.2-only", + "CC-BY-NC-ND-3.0", + "OFL-1.0-no-RFN", + "Sendmail", + "AGPL-3.0-only", + "CECILL-2.0", + "MIT-advertising", + "snprintf", + "CC-BY-ND-3.0", + "CC-BY-2.5-AU", + "NAIST-2003", + "NBPL-1.0", + "Ruby", + "HPND-doc", + "OSL-2.0", + "GPL-2.0-only", + "SMPPL", + "LZMA-SDK-9.11-to-9.20", + "OLDAP-2.6", + "Parity-7.0.0", + "Clips", + "Symlinks", + "OLDAP-1.1", + "NICTA-1.0", + "python-ldap", + "LiLiQ-Rplus-1.1", + "BSD-2-Clause-Patent", + "CC-BY-SA-1.0", + "LGPL-2.0-or-later", + "Intel-ACPI", + "CERN-OHL-P-2.0", + "SSH-short", + "Kazlib", + "TOSL", + "GLWTPL", + "BSD-3-Clause-Modification", + "OLDAP-2.2", + "BSD-3-Clause-No-Nuclear-License", + "TORQUE-1.1", + "PSF-2.0", + "CDDL-1.1", + "CDL-1.0", + "OSET-PL-2.1", + "EUPL-1.2", + "CAL-1.0", + "OPL-UK-3.0", + "Cronyx", + "GFDL-1.1-or-later", + "AFL-2.1", + "AFL-1.2", + "FDK-AAC", + "BSD-1-Clause", + "psfrag", + "OFL-1.1-RFN", + "CECILL-1.0", + "TCP-wrappers", + "CC-BY-NC-ND-2.0", + "APL-1.0", + "Knuth-CTAN", + "MIT-testregex", + "OSL-3.0", + "Linux-man-pages-copyleft-2-para", + "OLDAP-2.0.1", + "Beerware", + "Apache-2.0", + "CAL-1.0-Combined-Work-Exception", + "BSD-3-Clause-Sun", + "MakeIndex", + "GFDL-1.1-no-invariants-only", + "UCL-1.0", + "NASA-1.3", + "IJG", + "Xfig", + "Noweb", + "Mup", + "CC-BY-2.0", + "ODC-By-1.0", + "blessing", + "SSH-OpenSSH", + "CC-BY-NC-2.0", + "LPPL-1.2", + "GFDL-1.3-invariants-only", + "GFDL-1.2-no-invariants-only", + "OFL-1.0", + "SISSL-1.2", + "TPL-1.0", + "lsof", + "AGPL-1.0-or-later", + "MITNFA", + "metamail", + "Imlib2", + "AFL-2.0", + "EUPL-1.0", + "AAL", + "ssh-keyscan", + "Soundex", + "W3C-19980720", + "W3C", + "BitTorrent-1.1", + "Spencer-99", + "Sleepycat", + "DL-DE-ZERO-2.0", + "BSD-3-Clause", + "BSD-4-Clause-Shortened", + "SHL-0.51", + "LGPL-2.1-only", + "Parity-6.0.0", + "MIT-0", + "CC-PDDC", + "ulem", + "xinetd", + "Linux-man-pages-1-para", + "OLDAP-2.8", + "OML", + "ICU", + "SGI-B-2.0", + "ANTLR-PD-fallback", + "dvipdfm", + "EPL-2.0", + "OLDAP-1.3", + "Linux-man-pages-copyleft", + "OFL-1.1-no-RFN", + "ISC", + "GFDL-1.1-invariants-only", + "Adobe-2006", + "CC-BY-NC-ND-1.0", + "DSDP", + "D-FSL-1.0", + "SHL-0.5", + "SchemeReport", + "MulanPSL-1.0", + "NTP", + "Jam", + "CC-BY-SA-2.0-UK", + "BSD-3-Clause-Attribution", + "Lucida-Bitmap-Fonts", + "Zimbra-1.4", + "CUA-OPL-1.0", + "BSD-2-Clause", + "Community-Spec-1.0", + "OLDAP-2.0", + "diffmark", + "Abstyles", + "Zeeff", + "Brian-Gladman-3-Clause", + "Bitstream-Vera", + "Naumen", + "SGI-OpenGL", + "CC-BY-SA-2.1-JP", + "CC-BY-ND-4.0", + "MIT-Wu", + "gnuplot", + "SAX-PD", + "HPND-doc-sell", + "BitTorrent-1.0", + "HP-1989", + "OCLC-2.0", + "MS-LPL", + "Artistic-2.0", + "GFDL-1.2-invariants-or-later", + "JSON", + "checkmk", + "CC-BY-NC-SA-4.0", + "Graphics-Gems", + "GD", + "0BSD", + "MIT", + "OCCT-PL", + "LGPL-3.0-only", + "AdaCore-doc", + "CC-BY-NC-3.0", + "Spencer-94", + "HTMLTIDY", + "GFDL-1.2-no-invariants-or-later", + "BSD-4.3TAHOE", + "Giftware", + "MPL-1.1", + "OGDL-Taiwan-1.0", + "OLDAP-2.7", + "RSA-MD", + "Ferguson-Twofish", + "BSD-Source-Code", + "ASWF-Digital-Assets-1.0", + "YPL-1.0", + "OLDAP-2.1", + "Glulxe", + "PostgreSQL", + "Fair", + "APSL-1.0", + "GPL-1.0-or-later", + "libutil-David-Nugent", + "SCEA", + "BSD-3-Clause-No-Military-License", + "Xnet", + "MIT-feh", + "AGPL-1.0-only", + "Nokia", + "Cornell-Lossless-JPEG", + "swrule", + "OSL-1.1", + "EPL-1.0", + "XFree86-1.1", + "UCAR", + "copyleft-next-0.3.1", + "IJG-short", + "Plexus", + "Apache-1.1", + "UPL-1.0", + "HPND-DEC", + "HP-1986", + "GFDL-1.1-only", + "QPL-1.0", + "libpng-2.0", + "Zlib", + "GFDL-1.3-or-later", + "CERN-OHL-1.1", + "SugarCRM-1.1.3", + "VSL-1.0", + "NRL", + "Zend-2.0", + "OGL-Canada-2.0", + "EUDatagrid", + "MulanPSL-2.0", + "Newsletr", + "BSD-4-Clause-UC", + "PolyForm-Small-Business-1.0.0", + "MirOS", + "Adobe-Utopia", + "GFDL-1.1-no-invariants-or-later", + "RPL-1.5", + "TMate", + "libtiff", + "GPL-3.0-only", + "CC-BY-SA-3.0", + "Unicode-DFS-2016", + "CC-BY-NC-3.0-DE", + "NPL-1.0", + "eGenix", + "PolyForm-Noncommercial-1.0.0", + "Crossword", + "IEC-Code-Components-EULA", + "HPND", + "EFL-1.0", + "OLDAP-1.4", + "MMIXware", + "OpenPBS-2.3", + "Unicode-TOU", + "CC-BY-3.0-DE", + "EUPL-1.1", + "SL", + "Motosoto", + "Caldera", + "BSD-Inferno-Nettverk", + "TAPR-OHL-1.0", + "CC-BY-NC-SA-3.0", + "CC-BY-NC-SA-1.0", + "BSD-3-Clause-Open-MPI", + "CC-BY-1.0", + "PHP-3.01", + "PADL", + "AFL-1.1", + "MIT-CMU", + "BSD-3-Clause-flex", + "ODbL-1.0", + "CC-BY-NC-4.0", + "Python-2.0.1", + "IPA", + "AML", + "libselinux-1.0", + "CC-BY-3.0-AT", + "QPL-1.0-INRIA-2004", + "GFDL-1.1-invariants-or-later", + "Rdisc", + "BSD-Attribution-HPND-disclaimer", + "Xerox", + "LPPL-1.1", + "OGL-UK-3.0", + "Minpack", + "APSL-1.2", + "Eurosym", + "BSD-Advertising-Acknowledgement", + "CC-BY-NC-SA-2.0-UK", + "X11-distribute-modifications-variant", + "w3m", + "pnmstitch", + "CPAL-1.0", + "SISSL", + "LiLiQ-R-1.1", + "CC-BY-NC-SA-2.0", + "Unlicense", + "Linux-OpenIB", + "LOOP", + "CDLA-Sharing-1.0", + "CC-BY-3.0", + "OLDAP-2.4", + "CMU-Mach", + "LiLiQ-P-1.1", + "LGPL-2.0-only", + "APAFML", + "Entessa", + "CNRI-Python", + "OGC-1.0", + "HPND-UC", + "CC-BY-3.0-IGO", + "MTLL", + "HPND-Markus-Kuhn", + "CC-BY-NC-ND-3.0-IGO", + "MS-RL", + "AMDPLPA", + "LAL-1.2", + "OLDAP-2.2.1", + "curl", + "OLDAP-1.2", + "Inner-Net-2.0", + "TermReadKey", + "Artistic-1.0", + "CECILL-1.1", + "IPL-1.0", + "LPL-1.02", + "Baekmuk", + "NLOD-1.0", + "Sendmail-8.23", + "NGPL", + "SSPL-1.0", + "NCSA", + "CC0-1.0", + "CECILL-C", + "Furuseth", + "JasPer-2.0", + "LGPL-3.0-or-later", + "Libpng", + "Linux-man-pages-copyleft-var", + "OLDAP-2.2.2", + "FreeBSD-DOC", + "CC-BY-NC-ND-3.0-DE", + "NIST-PD-fallback", + "Widget-Workshop", + "RPL-1.1", + "ASWF-Digital-Assets-1.1", + "Net-SNMP", + "CC-BY-NC-SA-2.5", + "Unicode-DFS-2015", + "Intel", + "SGP4", + "Zimbra-1.3", + "OGTSL", + "PDDL-1.0", + "UnixCrypt", + "CERN-OHL-W-2.0", + "GFDL-1.3-only", + "CC-BY-NC-2.5", + "ErlPL-1.1", + "magaz", + "Borceux", + "App-s2p", + "CC-BY-NC-ND-4.0", + "CECILL-2.1", + "OGL-UK-2.0", + "BSD-Protection", + "CECILL-B", + "BSD-Systemics", + "OSL-1.0", + "EPICS", + "GFDL-1.3-no-invariants-only", + "RPSL-1.0", + "CPL-1.0", + "EFL-2.0", + "NPL-1.1", + "Cube", + "HPND-sell-regexpr", + "CC-BY-NC-SA-3.0-DE", + "AMPAS", + "NLOD-2.0", + "TTWL", + "SWL", + "MIT-Modern-Variant", + "FSFULLRWD", + "NCGL-UK-2.0", + "NTP-0", + "SGI-B-1.0", + "BSD-3-Clause-HP", + "CNRI-Python-GPL-Compatible", + "CDLA-Permissive-1.0", + "CC-BY-NC-SA-3.0-IGO", + "OPL-1.0", + "Frameworx-1.0", + "Zed", + "RHeCos-1.1", + "Boehm-GC", + "Martin-Birgmeier", + "CC-BY-SA-3.0-AT", + "LGPL-2.1-or-later", + "W3C-20150513", + "Kastrup", + "MPL-2.0", + "CPOL-1.02", + "Vim", + "zlib-acknowledgement", + "MIT-open-group", + "iMatix", + "MIT-Festival", + "URT-RLE", + "C-UDA-1.0", + "ZPL-1.1", + "CrystalStacker", + "CC-BY-NC-ND-2.5", + "CC-BY-NC-1.0", + "GFDL-1.2-invariants-only", + "HPND-sell-variant-MIT-disclaimer", + "MS-PL", + "HPND-Pbmplus", + "OFL-1.1", + "Leptonica", + "SunPro", + "WTFPL", + "CDDL-1.0", + "OFFIS", + "Latex2e", + "GFDL-1.3-no-invariants-or-later", + "xpp", + "LPPL-1.3c", + "xlock", + "DL-DE-BY-2.0", + "VOSTROM", + "APSL-1.1", + "ECL-2.0", + "bzip2-1.0.6", + "Xdebug-1.03", + "PHP-3.0", + "TCL", + "SGI-B-1.1", + "Python-2.0", + "APSL-2.0", + "Wsuipa", + "Apache-1.0", + "BSL-1.0", + "ANTLR-PD", + "LAL-1.3", + "HPND-export-US-modify", + "Arphic-1999", + "Dotseqn", + "Info-ZIP", + "psutils", + "NIST-PD", + "GPL-2.0-or-later", + "BSD-4.3RENO", + "HPND-sell-variant", + "CNRI-Jython", + "COIL-1.0", + "FSFAP", + "LPL-1.0", + "OLFL-1.3", + "Adobe-Glyph", + "NIST-Software", + "TTYP0", + "LGPLLR", + "CC-BY-ND-1.0", + "Elastic-2.0", + "FBM", + "LPPL-1.3a", + "AGPL-3.0-or-later", + "Barr", + "CDLA-Permissive-2.0", + "GPL-3.0-or-later", + "NetCDF", + "Bahyph", + "CC-BY-3.0-US", + "dtoa", + "CC-BY-2.5", + "Condor-1.1", + "check-cvs", + "mpi-permissive", + "RSCPL", + "Latex2e-translated-notice", + "TU-Berlin-1.0", + "SMLNJ", + "TPDL", + "Multics", + "BSD-4-Clause", + "BSD-2-Clause-Views", + "Glide", + "OPUBL-1.0", + "CC-BY-SA-2.0", + "HaskellReport", + "JPL-image", + "IBM-pibs", + "FTL", + "SNIA", + "Hippocratic-2.1", + "SimPL-2.0", + "BSD-3-Clause-Clear", + "Spencer-86", + "BUSL-1.1", + "ADSL", + "OLDAP-2.3", + "Interbase-1.0", + "OLDAP-2.5", + "Artistic-1.0-Perl", + "gSOAP-1.3b", + "NPOSL-3.0" + ] } }, "type": "object", @@ -68,7 +641,8 @@ "titleLang", "news", "desc", - "mode" + "mode", + "licenseInformation" ], "additionalProperties": false, "description": "Contains all common instance attributes", @@ -257,577 +831,56 @@ } }, "license": { - "description": "License of the software", - "type": "string", - "enum": [ - "Qhull", - "NOSL", - "CC-BY-ND-2.5", - "O-UDA-1.0", - "DRL-1.0", - "ImageMagick", - "mpich2", - "CC-BY-SA-4.0", - "SPL-1.0", - "McPhee-slideshow", - "MIT-enna", - "OSL-2.1", - "GFDL-1.2-or-later", - "BSD-3-Clause-LBNL", - "OFL-1.0-RFN", - "Watcom-1.0", - "MPL-1.0", - "Aladdin", - "etalab-2.0", - "copyleft-next-0.3.0", - "NLPL", - "mplus", - "ECL-1.0", - "fwlw", - "BlueOak-1.0.0", - "JPNIC", - "AFL-3.0", - "CC-BY-NC-SA-2.0-FR", - "GFDL-1.3-invariants-or-later", - "CFITSIO", - "GPL-1.0-only", - "XSkat", - "CC-BY-ND-2.0", - "CC-BY-SA-3.0-IGO", - "CC-BY-3.0-NL", - "FSFUL", - "HPND-export-US", - "CATOSL-1.1", - "ZPL-2.1", - "CC-BY-NC-SA-2.0-DE", - "OGL-UK-1.0", - "BSD-3-Clause-No-Nuclear-Warranty", - "TU-Berlin-2.0", - "Saxpath", - "ZPL-2.0", - "Bitstream-Charter", - "OpenSSL", - "ClArtistic", - "MPL-2.0-no-copyleft-exception", - "X11", - "FSFULLR", - "CC-BY-4.0", - "CC-BY-SA-3.0-DE", - "CC-BY-SA-2.5", - "MPEG-SSG", - "LPPL-1.0", - "FreeImage", - "CERN-OHL-1.2", - "Artistic-1.0-cl8", - "LZMA-SDK-9.22", - "BSD-3-Clause-No-Nuclear-License-2014", - "CC-BY-ND-3.0-DE", - "Afmparse", - "CERN-OHL-S-2.0", - "DOC", - "GL2PS", - "YPL-1.1", - "GFDL-1.2-only", - "CC-BY-NC-ND-3.0", - "OFL-1.0-no-RFN", - "Sendmail", - "AGPL-3.0-only", - "CECILL-2.0", - "MIT-advertising", - "snprintf", - "CC-BY-ND-3.0", - "CC-BY-2.5-AU", - "NAIST-2003", - "NBPL-1.0", - "Ruby", - "HPND-doc", - "OSL-2.0", - "GPL-2.0-only", - "SMPPL", - "LZMA-SDK-9.11-to-9.20", - "OLDAP-2.6", - "Parity-7.0.0", - "Clips", - "Symlinks", - "OLDAP-1.1", - "NICTA-1.0", - "python-ldap", - "LiLiQ-Rplus-1.1", - "BSD-2-Clause-Patent", - "CC-BY-SA-1.0", - "LGPL-2.0-or-later", - "Intel-ACPI", - "CERN-OHL-P-2.0", - "SSH-short", - "Kazlib", - "TOSL", - "GLWTPL", - "BSD-3-Clause-Modification", - "OLDAP-2.2", - "BSD-3-Clause-No-Nuclear-License", - "TORQUE-1.1", - "PSF-2.0", - "CDDL-1.1", - "CDL-1.0", - "OSET-PL-2.1", - "EUPL-1.2", - "CAL-1.0", - "OPL-UK-3.0", - "Cronyx", - "GFDL-1.1-or-later", - "AFL-2.1", - "AFL-1.2", - "FDK-AAC", - "BSD-1-Clause", - "psfrag", - "OFL-1.1-RFN", - "CECILL-1.0", - "TCP-wrappers", - "CC-BY-NC-ND-2.0", - "APL-1.0", - "Knuth-CTAN", - "MIT-testregex", - "OSL-3.0", - "Linux-man-pages-copyleft-2-para", - "OLDAP-2.0.1", - "Beerware", - "Apache-2.0", - "CAL-1.0-Combined-Work-Exception", - "BSD-3-Clause-Sun", - "MakeIndex", - "GFDL-1.1-no-invariants-only", - "UCL-1.0", - "NASA-1.3", - "IJG", - "Xfig", - "Noweb", - "Mup", - "CC-BY-2.0", - "ODC-By-1.0", - "blessing", - "SSH-OpenSSH", - "CC-BY-NC-2.0", - "LPPL-1.2", - "GFDL-1.3-invariants-only", - "GFDL-1.2-no-invariants-only", - "OFL-1.0", - "SISSL-1.2", - "TPL-1.0", - "lsof", - "AGPL-1.0-or-later", - "MITNFA", - "metamail", - "Imlib2", - "AFL-2.0", - "EUPL-1.0", - "AAL", - "ssh-keyscan", - "Soundex", - "W3C-19980720", - "W3C", - "BitTorrent-1.1", - "Spencer-99", - "Sleepycat", - "DL-DE-ZERO-2.0", - "BSD-3-Clause", - "BSD-4-Clause-Shortened", - "SHL-0.51", - "LGPL-2.1-only", - "Parity-6.0.0", - "MIT-0", - "CC-PDDC", - "ulem", - "xinetd", - "Linux-man-pages-1-para", - "OLDAP-2.8", - "OML", - "ICU", - "SGI-B-2.0", - "ANTLR-PD-fallback", - "dvipdfm", - "EPL-2.0", - "OLDAP-1.3", - "Linux-man-pages-copyleft", - "OFL-1.1-no-RFN", - "ISC", - "GFDL-1.1-invariants-only", - "Adobe-2006", - "CC-BY-NC-ND-1.0", - "DSDP", - "D-FSL-1.0", - "SHL-0.5", - "SchemeReport", - "MulanPSL-1.0", - "NTP", - "Jam", - "CC-BY-SA-2.0-UK", - "BSD-3-Clause-Attribution", - "Lucida-Bitmap-Fonts", - "Zimbra-1.4", - "CUA-OPL-1.0", - "BSD-2-Clause", - "Community-Spec-1.0", - "OLDAP-2.0", - "diffmark", - "Abstyles", - "Zeeff", - "Brian-Gladman-3-Clause", - "Bitstream-Vera", - "Naumen", - "SGI-OpenGL", - "CC-BY-SA-2.1-JP", - "CC-BY-ND-4.0", - "MIT-Wu", - "gnuplot", - "SAX-PD", - "HPND-doc-sell", - "BitTorrent-1.0", - "HP-1989", - "OCLC-2.0", - "MS-LPL", - "Artistic-2.0", - "GFDL-1.2-invariants-or-later", - "JSON", - "checkmk", - "CC-BY-NC-SA-4.0", - "Graphics-Gems", - "GD", - "0BSD", - "MIT", - "OCCT-PL", - "LGPL-3.0-only", - "AdaCore-doc", - "CC-BY-NC-3.0", - "Spencer-94", - "HTMLTIDY", - "GFDL-1.2-no-invariants-or-later", - "BSD-4.3TAHOE", - "Giftware", - "MPL-1.1", - "OGDL-Taiwan-1.0", - "OLDAP-2.7", - "RSA-MD", - "Ferguson-Twofish", - "BSD-Source-Code", - "ASWF-Digital-Assets-1.0", - "YPL-1.0", - "OLDAP-2.1", - "Glulxe", - "PostgreSQL", - "Fair", - "APSL-1.0", - "GPL-1.0-or-later", - "libutil-David-Nugent", - "SCEA", - "BSD-3-Clause-No-Military-License", - "Xnet", - "MIT-feh", - "AGPL-1.0-only", - "Nokia", - "Cornell-Lossless-JPEG", - "swrule", - "OSL-1.1", - "EPL-1.0", - "XFree86-1.1", - "UCAR", - "copyleft-next-0.3.1", - "IJG-short", - "Plexus", - "Apache-1.1", - "UPL-1.0", - "HPND-DEC", - "HP-1986", - "GFDL-1.1-only", - "QPL-1.0", - "libpng-2.0", - "Zlib", - "GFDL-1.3-or-later", - "CERN-OHL-1.1", - "SugarCRM-1.1.3", - "VSL-1.0", - "NRL", - "Zend-2.0", - "OGL-Canada-2.0", - "EUDatagrid", - "MulanPSL-2.0", - "Newsletr", - "BSD-4-Clause-UC", - "PolyForm-Small-Business-1.0.0", - "MirOS", - "Adobe-Utopia", - "GFDL-1.1-no-invariants-or-later", - "RPL-1.5", - "TMate", - "libtiff", - "GPL-3.0-only", - "CC-BY-SA-3.0", - "Unicode-DFS-2016", - "CC-BY-NC-3.0-DE", - "NPL-1.0", - "eGenix", - "PolyForm-Noncommercial-1.0.0", - "Crossword", - "IEC-Code-Components-EULA", - "HPND", - "EFL-1.0", - "OLDAP-1.4", - "MMIXware", - "OpenPBS-2.3", - "Unicode-TOU", - "CC-BY-3.0-DE", - "EUPL-1.1", - "SL", - "Motosoto", - "Caldera", - "BSD-Inferno-Nettverk", - "TAPR-OHL-1.0", - "CC-BY-NC-SA-3.0", - "CC-BY-NC-SA-1.0", - "BSD-3-Clause-Open-MPI", - "CC-BY-1.0", - "PHP-3.01", - "PADL", - "AFL-1.1", - "MIT-CMU", - "BSD-3-Clause-flex", - "ODbL-1.0", - "CC-BY-NC-4.0", - "Python-2.0.1", - "IPA", - "AML", - "libselinux-1.0", - "CC-BY-3.0-AT", - "QPL-1.0-INRIA-2004", - "GFDL-1.1-invariants-or-later", - "Rdisc", - "BSD-Attribution-HPND-disclaimer", - "Xerox", - "LPPL-1.1", - "OGL-UK-3.0", - "Minpack", - "APSL-1.2", - "Eurosym", - "BSD-Advertising-Acknowledgement", - "CC-BY-NC-SA-2.0-UK", - "X11-distribute-modifications-variant", - "w3m", - "pnmstitch", - "CPAL-1.0", - "SISSL", - "LiLiQ-R-1.1", - "CC-BY-NC-SA-2.0", - "Unlicense", - "Linux-OpenIB", - "LOOP", - "CDLA-Sharing-1.0", - "CC-BY-3.0", - "OLDAP-2.4", - "CMU-Mach", - "LiLiQ-P-1.1", - "LGPL-2.0-only", - "APAFML", - "Entessa", - "CNRI-Python", - "OGC-1.0", - "HPND-UC", - "CC-BY-3.0-IGO", - "MTLL", - "HPND-Markus-Kuhn", - "CC-BY-NC-ND-3.0-IGO", - "MS-RL", - "AMDPLPA", - "LAL-1.2", - "OLDAP-2.2.1", - "curl", - "OLDAP-1.2", - "Inner-Net-2.0", - "TermReadKey", - "Artistic-1.0", - "CECILL-1.1", - "IPL-1.0", - "LPL-1.02", - "Baekmuk", - "NLOD-1.0", - "Sendmail-8.23", - "NGPL", - "SSPL-1.0", - "NCSA", - "CC0-1.0", - "CECILL-C", - "Furuseth", - "JasPer-2.0", - "LGPL-3.0-or-later", - "Libpng", - "Linux-man-pages-copyleft-var", - "OLDAP-2.2.2", - "FreeBSD-DOC", - "CC-BY-NC-ND-3.0-DE", - "NIST-PD-fallback", - "Widget-Workshop", - "RPL-1.1", - "ASWF-Digital-Assets-1.1", - "Net-SNMP", - "CC-BY-NC-SA-2.5", - "Unicode-DFS-2015", - "Intel", - "SGP4", - "Zimbra-1.3", - "OGTSL", - "PDDL-1.0", - "UnixCrypt", - "CERN-OHL-W-2.0", - "GFDL-1.3-only", - "CC-BY-NC-2.5", - "ErlPL-1.1", - "magaz", - "Borceux", - "App-s2p", - "CC-BY-NC-ND-4.0", - "CECILL-2.1", - "OGL-UK-2.0", - "BSD-Protection", - "CECILL-B", - "BSD-Systemics", - "OSL-1.0", - "EPICS", - "GFDL-1.3-no-invariants-only", - "RPSL-1.0", - "CPL-1.0", - "EFL-2.0", - "NPL-1.1", - "Cube", - "HPND-sell-regexpr", - "CC-BY-NC-SA-3.0-DE", - "AMPAS", - "NLOD-2.0", - "TTWL", - "SWL", - "MIT-Modern-Variant", - "FSFULLRWD", - "NCGL-UK-2.0", - "NTP-0", - "SGI-B-1.0", - "BSD-3-Clause-HP", - "CNRI-Python-GPL-Compatible", - "CDLA-Permissive-1.0", - "CC-BY-NC-SA-3.0-IGO", - "OPL-1.0", - "Frameworx-1.0", - "Zed", - "RHeCos-1.1", - "Boehm-GC", - "Martin-Birgmeier", - "CC-BY-SA-3.0-AT", - "LGPL-2.1-or-later", - "W3C-20150513", - "Kastrup", - "MPL-2.0", - "CPOL-1.02", - "Vim", - "zlib-acknowledgement", - "MIT-open-group", - "iMatix", - "MIT-Festival", - "URT-RLE", - "C-UDA-1.0", - "ZPL-1.1", - "CrystalStacker", - "CC-BY-NC-ND-2.5", - "CC-BY-NC-1.0", - "GFDL-1.2-invariants-only", - "HPND-sell-variant-MIT-disclaimer", - "MS-PL", - "HPND-Pbmplus", - "OFL-1.1", - "Leptonica", - "SunPro", - "WTFPL", - "CDDL-1.0", - "OFFIS", - "Latex2e", - "GFDL-1.3-no-invariants-or-later", - "xpp", - "LPPL-1.3c", - "xlock", - "DL-DE-BY-2.0", - "VOSTROM", - "APSL-1.1", - "ECL-2.0", - "bzip2-1.0.6", - "Xdebug-1.03", - "PHP-3.0", - "TCL", - "SGI-B-1.1", - "Python-2.0", - "APSL-2.0", - "Wsuipa", - "Apache-1.0", - "BSL-1.0", - "ANTLR-PD", - "LAL-1.3", - "HPND-export-US-modify", - "Arphic-1999", - "Dotseqn", - "Info-ZIP", - "psutils", - "NIST-PD", - "GPL-2.0-or-later", - "BSD-4.3RENO", - "HPND-sell-variant", - "CNRI-Jython", - "COIL-1.0", - "FSFAP", - "LPL-1.0", - "OLFL-1.3", - "Adobe-Glyph", - "NIST-Software", - "TTYP0", - "LGPLLR", - "CC-BY-ND-1.0", - "Elastic-2.0", - "FBM", - "LPPL-1.3a", - "AGPL-3.0-or-later", - "Barr", - "CDLA-Permissive-2.0", - "GPL-3.0-or-later", - "NetCDF", - "Bahyph", - "CC-BY-3.0-US", - "dtoa", - "CC-BY-2.5", - "Condor-1.1", - "check-cvs", - "mpi-permissive", - "RSCPL", - "Latex2e-translated-notice", - "TU-Berlin-1.0", - "SMLNJ", - "TPDL", - "Multics", - "BSD-4-Clause", - "BSD-2-Clause-Views", - "Glide", - "OPUBL-1.0", - "CC-BY-SA-2.0", - "HaskellReport", - "JPL-image", - "IBM-pibs", - "FTL", - "SNIA", - "Hippocratic-2.1", - "SimPL-2.0", - "BSD-3-Clause-Clear", - "Spencer-86", - "BUSL-1.1", - "ADSL", - "OLDAP-2.3", - "Interbase-1.0", - "OLDAP-2.5", - "Artistic-1.0-Perl", - "gSOAP-1.3b", - "NPOSL-3.0" - ] + "description": "DEPRECATED: Use 'common.licenseInformation' instead, move the current 'common.license' attribute to package.json instead!", + "$ref": "#/definitions/license" + }, + "licenseInformation": { + "type": "object", + "properties": { + "license": { + "$ref": "#/definitions/license" + }, + "type": { + "description": "Use 'paid' for adapters which do not work without a paid license. Use 'commercial' for adapters which require a license for commercial use only. Use 'limited' if some functionalities are not available without a paid license.", + "type": "string", + "enum": [ + "free", + "paid", + "commercial", + "limited" + ] + }, + "link": { + "description": "Hyperlink, where information about the license can be found. This is required if the license type is different from 'free'.", + "type": "string", + "pattern": "^https://.+$" + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "if": { + "properties": { + "type": { + "enum": [ + "paid", + "commercial", + "limited" + ] + } + } + }, + "then": { + "properties": { + "test": { + "type": "string" + } + }, + "required": [ + "link" + ] + } }, "type": { "description": "Type of the adapter", diff --git a/schemas/updateSchemas.ts b/schemas/updateSchemas.ts index 6938c4dfd4..be5f274f7d 100644 --- a/schemas/updateSchemas.ts +++ b/schemas/updateSchemas.ts @@ -29,7 +29,7 @@ async function updateLicenseArray(): Promise { // get all allowed licenses as array const licenses = await getSpdxLicenseIds(); const ioPackSchema = fs.readJSONSync(path.join(__dirname, 'io-package.json')); - ioPackSchema.properties.common.properties.license.enum = licenses; + ioPackSchema.definitions.license.enum = licenses; fs.writeJSONSync(path.join(__dirname, 'io-package.json'), ioPackSchema, { spaces: 2 }); }