[REST Sandbox] Remove SwaggerUI from MediaWiki Releases
Bug: T397470 Change-Id: I4e25792e347e8eeeb1dee4db1d25128948c1cdd0
This commit is contained in:
parent
d1769e3a51
commit
da8d30e0c6
43 changed files with 0 additions and 1689 deletions
|
|
@ -2569,7 +2569,6 @@ $wgAutoloadLocalClasses = [
|
|||
'MediaWiki\\Specials\\SpecialRemoveCredentials' => __DIR__ . '/includes/specials/SpecialRemoveCredentials.php',
|
||||
'MediaWiki\\Specials\\SpecialRenameUser' => __DIR__ . '/includes/specials/SpecialRenameUser.php',
|
||||
'MediaWiki\\Specials\\SpecialResetTokens' => __DIR__ . '/includes/specials/SpecialResetTokens.php',
|
||||
'MediaWiki\\Specials\\SpecialRestSandbox' => __DIR__ . '/includes/specials/SpecialRestSandbox.php',
|
||||
'MediaWiki\\Specials\\SpecialRevisionDelete' => __DIR__ . '/includes/specials/SpecialRevisionDelete.php',
|
||||
'MediaWiki\\Specials\\SpecialRunJobs' => __DIR__ . '/includes/specials/SpecialRunJobs.php',
|
||||
'MediaWiki\\Specials\\SpecialSearch' => __DIR__ . '/includes/specials/SpecialSearch.php',
|
||||
|
|
|
|||
|
|
@ -7745,26 +7745,6 @@ config-schema:
|
|||
description: |-
|
||||
Additional REST API Route files.
|
||||
A common usage is to enable development/experimental endpoints only on test wikis.
|
||||
RestSandboxSpecs:
|
||||
default: { }
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
properties: { url: { type: string, format: url }, name: { type: string }, msg: { type: string, description: 'a message key' } }
|
||||
required: [url]
|
||||
description: |-
|
||||
A list of OpenAPI specs to be made available for exploration on
|
||||
Special:RestSandbox. If none are given, Special:RestSandbox is disabled.
|
||||
This is an associative array, arbitrary spec IDs to spec descriptions.
|
||||
Each spec description is an array with the following keys:
|
||||
- url: the URL that will return the OpenAPI spec.
|
||||
- name: the name of the API, to be shown on Special:RestSandbox.
|
||||
Ignored if msg is given.
|
||||
- msg: a message key for the name of the API, to be shown on
|
||||
Special:RestSandbox.
|
||||
@unstable Introduced in 1.43. We may want to rename or change this to
|
||||
accommodate the need to list external APIs in a central discovery
|
||||
document.
|
||||
MaxShellMemory:
|
||||
default: 307200
|
||||
description: 'Maximum amount of virtual memory available to shell processes under linux, in KiB.'
|
||||
|
|
|
|||
|
|
@ -4226,12 +4226,6 @@ $wgAllowedCorsHeaders = null;
|
|||
*/
|
||||
$wgRestAPIAdditionalRouteFiles = null;
|
||||
|
||||
/**
|
||||
* Config variable stub for the RestSandboxSpecs setting, for use by phpdoc and IDEs.
|
||||
* @see MediaWiki\MainConfigSchema::RestSandboxSpecs
|
||||
*/
|
||||
$wgRestSandboxSpecs = null;
|
||||
|
||||
/**
|
||||
* Config variable stub for the MaxShellMemory setting, for use by phpdoc and IDEs.
|
||||
* @see MediaWiki\MainConfigSchema::MaxShellMemory
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
BSD Zero Clause License
|
||||
|
||||
Copyright (C) YEAR by AUTHOR EMAIL
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee
|
||||
is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
OF THIS SOFTWARE.
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
To apply the Apache License to your work, attach the following boilerplate
|
||||
notice, with the fields enclosed by brackets "[]" replaced with your own
|
||||
identifying information. (Don't include the brackets!) The text should be
|
||||
enclosed in the appropriate comment syntax for the file format. We also
|
||||
recommend that a file or class name and description of purpose be included on
|
||||
the same "printed page" as the copyright notice for easier identification
|
||||
within third-party archives.
|
||||
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
The following is a BSD 2-Clause license template. To generate your own license,
|
||||
change the values of OWNER and YEAR from their original values as given here,
|
||||
and substitute your own.
|
||||
|
||||
|
||||
Copyright (c) <YEAR>, <OWNER>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
The following is a BSD 3-Clause ("BSD New" or "BSD Simplified") license
|
||||
template. To generate your own license, change the values of OWNER,
|
||||
ORGANIZATION and YEAR from their original values as given here, and substitute
|
||||
your own
|
||||
|
||||
|
||||
|
||||
Copyright (c) <YEAR>, <OWNER>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
@ -1,121 +0,0 @@
|
|||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
Copyright <YEAR> <OWNER>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee
|
||||
is hereby granted, provided that the above copyright notice and this permission notice appear in all
|
||||
copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
THIS SOFTWARE.
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
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.
|
||||
|
|
@ -1,296 +0,0 @@
|
|||
Mozilla Public License, version 2.0
|
||||
1. Definitions
|
||||
1.1. “Contributor”
|
||||
means each individual or legal entity that creates, contributes to the creation
|
||||
of, or owns Covered Software.
|
||||
|
||||
1.2. “Contributor Version”
|
||||
means the combination of the Contributions of others (if any) used by a
|
||||
Contributor and that particular Contributor’s Contribution.
|
||||
|
||||
1.3. “Contribution”
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. “Covered Software”
|
||||
means Source Code Form to which the initial Contributor has attached the notice
|
||||
in Exhibit A, the Executable Form of such Source Code Form, and Modifications
|
||||
of such Source Code Form, in each case including portions thereof.
|
||||
|
||||
1.5. “Incompatible With Secondary Licenses”
|
||||
means
|
||||
|
||||
that the initial Contributor has attached the notice described in Exhibit B to
|
||||
the Covered Software; or
|
||||
|
||||
that the Covered Software was made available under the terms of version 1.1 or
|
||||
earlier of the License, but not also under the terms of a Secondary License.
|
||||
|
||||
1.6. “Executable Form”
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. “Larger Work”
|
||||
means a work that combines Covered Software with other material, in a separate
|
||||
file or files, that is not Covered Software.
|
||||
|
||||
1.8. “License”
|
||||
means this document.
|
||||
|
||||
1.9. “Licensable”
|
||||
means having the right to grant, to the maximum extent possible, whether at the
|
||||
time of the initial grant or subsequently, any and all of the rights conveyed
|
||||
by this License.
|
||||
|
||||
1.10. “Modifications”
|
||||
means any of the following:
|
||||
|
||||
any file in Source Code Form that results from an addition to, deletion from,
|
||||
or modification of the contents of Covered Software; or
|
||||
|
||||
any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.11. “Patent Claims” of a Contributor
|
||||
means any patent claim(s), including without limitation, method, process, and
|
||||
apparatus claims, in any patent Licensable by such Contributor that would be
|
||||
infringed, but for the grant of the License, by the making, using, selling,
|
||||
offering for sale, having made, import, or transfer of either its Contributions
|
||||
or its Contributor Version.
|
||||
|
||||
1.12. “Secondary License”
|
||||
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
||||
General Public License, Version 2.1, the GNU Affero General Public License,
|
||||
Version 3.0, or any later versions of those licenses.
|
||||
|
||||
1.13. “Source Code Form”
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. “You” (or “Your”)
|
||||
means an individual or a legal entity exercising rights under this License. For
|
||||
legal entities, “You” includes any entity that controls, is controlled by, or
|
||||
is under common control with You. For purposes of this definition, “control”
|
||||
means (a) the power, direct or indirect, to cause the direction or management
|
||||
of such entity, whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial ownership of such
|
||||
entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
2.1. Grants
|
||||
Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive
|
||||
license:
|
||||
|
||||
under intellectual property rights (other than patent or trademark) Licensable
|
||||
by such Contributor to use, reproduce, make available, modify, display,
|
||||
perform, distribute, and otherwise exploit its Contributions, either on an
|
||||
unmodified basis, with Modifications, or as part of a Larger Work; and
|
||||
|
||||
under Patent Claims of such Contributor to make, use, sell, offer for sale,
|
||||
have made, import, and otherwise transfer either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
The licenses granted in Section 2.1 with respect to any Contribution become
|
||||
effective for each Contribution on the date the Contributor first distributes
|
||||
such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
The licenses granted in this Section 2 are the only rights granted under this
|
||||
License. No additional rights or licenses will be implied from the distribution
|
||||
or licensing of Covered Software under this License. Notwithstanding Section
|
||||
2.1(b) above, no patent license is granted by a Contributor:
|
||||
|
||||
for any code that a Contributor has removed from Covered Software; or
|
||||
|
||||
for infringements caused by: (i) Your and any other third party’s modifications
|
||||
of Covered Software, or (ii) the combination of its Contributions with other
|
||||
software (except as part of its Contributor Version); or
|
||||
|
||||
under Patent Claims infringed by Covered Software in the absence of its
|
||||
Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks, or
|
||||
logos of any Contributor (except as may be necessary to comply with the notice
|
||||
requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
No Contributor makes additional grants as a result of Your choice to distribute
|
||||
the Covered Software under a subsequent version of this License (see Section
|
||||
10.2) or under the terms of a Secondary License (if permitted under the terms
|
||||
of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
Each Contributor represents that the Contributor believes its Contributions are
|
||||
its original creation(s) or it has sufficient rights to grant the rights to its
|
||||
Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
This License is not intended to limit any rights You have under applicable
|
||||
copyright doctrines of fair use, fair dealing, or other equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
||||
Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
3.1. Distribution of Source Form
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under the
|
||||
terms of this License. You must inform recipients that the Source Code Form of
|
||||
the Covered Software is governed by the terms of this License, and how they can
|
||||
obtain a copy of this License. You may not attempt to alter or restrict the
|
||||
recipients’ rights in the Source Code Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
such Covered Software must also be made available in Source Code Form, as
|
||||
described in Section 3.1, and You must inform recipients of the Executable Form
|
||||
how they can obtain a copy of such Source Code Form by reasonable means in a
|
||||
timely manner, at a charge no more than the cost of distribution to the
|
||||
recipient; and
|
||||
|
||||
You may distribute such Executable Form under the terms of this License, or
|
||||
sublicense it under different terms, provided that the license for the
|
||||
Executable Form does not attempt to limit or alter the recipients’ rights in
|
||||
the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for the
|
||||
Covered Software. If the Larger Work is a combination of Covered Software with
|
||||
a work governed by one or more Secondary Licenses, and the Covered Software is
|
||||
not Incompatible With Secondary Licenses, this License permits You to
|
||||
additionally distribute such Covered Software under the terms of such Secondary
|
||||
License(s), so that the recipient of the Larger Work may, at their option,
|
||||
further distribute the Covered Software under the terms of either this License
|
||||
or such Secondary License(s).
|
||||
|
||||
3.4. Notices
|
||||
You may not remove or alter the substance of any license notices (including
|
||||
copyright notices, patent notices, disclaimers of warranty, or limitations of
|
||||
liability) contained within the Source Code Form of the Covered Software,
|
||||
except that You may alter any license notices to the extent required to remedy
|
||||
known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
You may choose to offer, and to charge a fee for, warranty, support, indemnity
|
||||
or liability obligations to one or more recipients of Covered Software.
|
||||
However, You may do so only on Your own behalf, and not on behalf of any
|
||||
Contributor. You must make it absolutely clear that any such warranty, support,
|
||||
indemnity, or liability obligation is offered by You alone, and You hereby
|
||||
agree to indemnify every Contributor for any liability incurred by such
|
||||
Contributor as a result of warranty, support, indemnity or liability terms You
|
||||
offer. You may include additional disclaimers of warranty and limitations of
|
||||
liability specific to any jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
If it is impossible for You to comply with any of the terms of this License
|
||||
with respect to some or all of the Covered Software due to statute, judicial
|
||||
order, or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and the code
|
||||
they affect. Such description must be placed in a text file included with all
|
||||
distributions of the Covered Software under this License. Except to the extent
|
||||
prohibited by statute or regulation, such description must be sufficiently
|
||||
detailed for a recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
5.1. The rights granted under this License will terminate automatically if You
|
||||
fail to comply with any of its terms. However, if You become compliant, then
|
||||
the rights granted under this License from a particular Contributor are
|
||||
reinstated (a) provisionally, unless and until such Contributor explicitly and
|
||||
finally terminates Your grants, and (b) on an ongoing basis, if such
|
||||
Contributor fails to notify You of the non-compliance by some reasonable means
|
||||
prior to 60 days after You have come back into compliance. Moreover, Your
|
||||
grants from a particular Contributor are reinstated on an ongoing basis if such
|
||||
Contributor notifies You of the non-compliance by some reasonable means, this
|
||||
is the first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after Your
|
||||
receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions, counter-claims, and
|
||||
cross-claims) alleging that a Contributor Version directly or indirectly
|
||||
infringes any patent, then the rights granted to You by any and all
|
||||
Contributors for the Covered Software under Section 2.1 of this License shall
|
||||
terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
||||
license agreements (excluding distributors and resellers) which have been
|
||||
validly granted by You or Your distributors under this License prior to
|
||||
termination shall survive termination.
|
||||
|
||||
6. Disclaimer of Warranty
|
||||
Covered Software is provided under this License on an “as is” basis, without
|
||||
warranty of any kind, either expressed, implied, or statutory, including,
|
||||
without limitation, warranties that the Covered Software is free of defects,
|
||||
merchantable, fit for a particular purpose or non-infringing. The entire risk
|
||||
as to the quality and performance of the Covered Software is with You. Should
|
||||
any Covered Software prove defective in any respect, You (not any Contributor)
|
||||
assume the cost of any necessary servicing, repair, or correction. This
|
||||
disclaimer of warranty constitutes an essential part of this License. No use of
|
||||
any Covered Software is authorized under this License except under this
|
||||
disclaimer.
|
||||
|
||||
7. Limitation of Liability
|
||||
Under no circumstances and under no legal theory, whether tort (including
|
||||
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
||||
distributes Covered Software as permitted above, be liable to You for any
|
||||
direct, indirect, special, incidental, or consequential damages of any
|
||||
character including, without limitation, damages for lost profits, loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all other
|
||||
commercial damages or losses, even if such party shall have been informed of
|
||||
the possibility of such damages. This limitation of liability shall not apply
|
||||
to liability for death or personal injury resulting from such party’s
|
||||
negligence to the extent applicable law prohibits such limitation. Some
|
||||
jurisdictions do not allow the exclusion or limitation of incidental or
|
||||
consequential damages, so this exclusion and limitation may not apply to You.
|
||||
|
||||
8. Litigation
|
||||
Any litigation relating to this License may be brought only in the courts of a
|
||||
jurisdiction where the defendant maintains its principal place of business and
|
||||
such litigation shall be governed by laws of that jurisdiction, without
|
||||
reference to its conflict-of-law provisions. Nothing in this Section shall
|
||||
prevent a party’s ability to bring cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
This License represents the complete agreement concerning the subject matter
|
||||
hereof. If any provision of this License is held to be unenforceable, such
|
||||
provision shall be reformed only to the extent necessary to make it
|
||||
enforceable. Any law or regulation which provides that the language of a
|
||||
contract shall be construed against the drafter shall not be used to construe
|
||||
this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
10.1. New Versions
|
||||
Mozilla Foundation is the license steward. Except as provided in Section 10.3,
|
||||
no one other than the license steward has the right to modify or publish new
|
||||
versions of this License. Each version will be given a distinguishing version
|
||||
number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
You may distribute the Covered Software under the terms of the version of the
|
||||
License under which You originally received the Covered Software, or under the
|
||||
terms of any subsequent version published by the license steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
If you create software not governed by this License, and you want to create a
|
||||
new license for such software, you may create and use a modified version of
|
||||
this License if you rename the license and remove any references to the name of
|
||||
the license steward (except to note that such modified license differs from
|
||||
this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the notice
|
||||
described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
This Source Code Form is subject to the terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not distributed with this file, You can obtain
|
||||
one at http://mozilla.org/MPL/2.0/.
|
||||
If it is not possible or desirable to put the notice in a particular file, then
|
||||
You may include the notice in a location (such as a LICENSE file in a relevant
|
||||
directory) where a recipient would be likely to look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - “Incompatible With Secondary Licenses” Notice
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
||||
(“PSF”), and the Individual or Organization (“Licensee”) accessing and
|
||||
otherwise using this software (“Python”) in source or binary form and
|
||||
its associated documentation.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, PSF
|
||||
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
||||
license to reproduce, analyze, test, perform and/or display publicly,
|
||||
prepare derivative works, distribute, and otherwise use Python
|
||||
alone or in any derivative version, provided, however, that PSF’s
|
||||
License Agreement and PSF’s notice of copyright, i.e., “Copyright (c)
|
||||
2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; All Rights
|
||||
Reserved” are retained in Python alone or in any derivative version
|
||||
prepared by Licensee.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python or any part thereof, and wants to make
|
||||
the derivative work available to others as provided herein, then
|
||||
Licensee hereby agrees to include in any such work a brief summary of
|
||||
the changes made to Python.
|
||||
|
||||
4. PSF is making Python available to Licensee on an “AS IS”
|
||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. Nothing in this License Agreement shall be deemed to create any
|
||||
relationship of agency, partnership, or joint venture between PSF and
|
||||
Licensee. This License Agreement does not grant permission to use PSF
|
||||
trademarks or trade name in a trademark sense to endorse or promote
|
||||
products or services of Licensee, or any third party.
|
||||
|
||||
8. By copying, installing or otherwise using Python, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
|
||||
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
|
||||
——————————————-
|
||||
|
||||
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
|
||||
|
||||
1. This LICENSE AGREEMENT is between BeOpen.com (“BeOpen”), having an
|
||||
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
|
||||
Individual or Organization (“Licensee”) accessing and otherwise using
|
||||
this software in source or binary form and its associated
|
||||
documentation (“the Software”).
|
||||
|
||||
2. Subject to the terms and conditions of this BeOpen Python License
|
||||
Agreement, BeOpen hereby grants Licensee a non-exclusive,
|
||||
royalty-free, world-wide license to reproduce, analyze, test, perform
|
||||
and/or display publicly, prepare derivative works, distribute, and
|
||||
otherwise use the Software alone or in any derivative version,
|
||||
provided, however, that the BeOpen Python License is retained in the
|
||||
Software, alone or in any derivative version prepared by Licensee.
|
||||
|
||||
3. BeOpen is making the Software available to Licensee on an “AS IS”
|
||||
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
||||
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
|
||||
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
|
||||
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
5. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
6. This License Agreement shall be governed by and interpreted in all
|
||||
respects by the law of the State of California, excluding conflict of
|
||||
law provisions. Nothing in this License Agreement shall be deemed to
|
||||
create any relationship of agency, partnership, or joint venture
|
||||
between BeOpen and Licensee. This License Agreement does not grant
|
||||
permission to use BeOpen trademarks or trade names in a trademark
|
||||
sense to endorse or promote products or services of Licensee, or any
|
||||
third party. As an exception, the “BeOpen Python” logos available at
|
||||
http://www.pythonlabs.com/logos.html may be used according to the
|
||||
permissions granted on that web page.
|
||||
|
||||
7. By copying, installing or otherwise using the software, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
|
||||
CNRI OPEN SOURCE LICENSE AGREEMENT (for Python 1.6b1)
|
||||
————————————————–
|
||||
|
||||
IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY.
|
||||
|
||||
BY CLICKING ON “ACCEPT” WHERE INDICATED BELOW, OR BY COPYING,
|
||||
INSTALLING OR OTHERWISE USING PYTHON 1.6, beta 1 SOFTWARE, YOU ARE
|
||||
DEEMED TO HAVE AGREED TO THE TERMS AND CONDITIONS OF THIS LICENSE
|
||||
AGREEMENT.
|
||||
|
||||
1. This LICENSE AGREEMENT is between the Corporation for National
|
||||
Research Initiatives, having an office at 1895 Preston White Drive,
|
||||
Reston, VA 20191 (“CNRI”), and the Individual or Organization
|
||||
(“Licensee”) accessing and otherwise using Python 1.6, beta 1
|
||||
software in source or binary form and its associated documentation,
|
||||
as released at the www.python.org Internet site on August 4, 2000
|
||||
(“Python 1.6b1”).
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, CNRI
|
||||
hereby grants Licensee a non-exclusive, royalty-free, world-wide
|
||||
license to reproduce, analyze, test, perform and/or display
|
||||
publicly, prepare derivative works, distribute, and otherwise use
|
||||
Python 1.6b1 alone or in any derivative version, provided, however,
|
||||
that CNRIs License Agreement is retained in Python 1.6b1, alone or
|
||||
in any derivative version prepared by Licensee.
|
||||
|
||||
Alternately, in lieu of CNRIs License Agreement, Licensee may
|
||||
substitute the following text (omitting the quotes): “Python 1.6,
|
||||
beta 1, is made available subject to the terms and conditions in
|
||||
CNRIs License Agreement. This Agreement may be located on the
|
||||
Internet using the following unique, persistent identifier (known
|
||||
as a handle): 1895.22/1011. This Agreement may also be obtained
|
||||
from a proxy server on the Internet using the
|
||||
URL:http://hdl.handle.net/1895.22/1011”.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python 1.6b1 or any part thereof, and wants to make
|
||||
the derivative work available to the public as provided herein,
|
||||
then Licensee hereby agrees to indicate in any such work the nature
|
||||
of the modifications made to Python 1.6b1.
|
||||
|
||||
4. CNRI is making Python 1.6b1 available to Licensee on an “AS IS”
|
||||
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR
|
||||
FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6b1
|
||||
WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
||||
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR
|
||||
LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING PYTHON 1.6b1,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. This License Agreement shall be governed by and interpreted in all
|
||||
respects by the law of the State of Virginia, excluding conflict of
|
||||
law provisions. Nothing in this License Agreement shall be deemed
|
||||
to create any relationship of agency, partnership, or joint venture
|
||||
between CNRI and Licensee. This License Agreement does not grant
|
||||
permission to use CNRI trademarks or trade name in a trademark
|
||||
sense to endorse or promote products or services of Licensee, or
|
||||
any third party.
|
||||
|
||||
8. By clicking on the “ACCEPT” button where indicated, or by copying,
|
||||
installing or otherwise using Python 1.6b1, Licensee agrees to be
|
||||
bound by the terms and conditions of this License Agreement.
|
||||
|
||||
ACCEPT
|
||||
|
||||
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
|
||||
————————————————–
|
||||
|
||||
Copyright (c) 1991 – 1995, Stichting Mathematisch Centrum Amsterdam,
|
||||
The Netherlands. All rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of Stichting Mathematisch
|
||||
Centrum or CWI not be used in advertising or publicity pertaining to
|
||||
distribution of the software without specific, written prior
|
||||
permission.
|
||||
|
||||
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
||||
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
||||
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
This directory contains the text of licenses commonly used by libraries.
|
||||
They are included here for reference, in case they are not part of the
|
||||
respective library's distribution.
|
||||
|
||||
Note that all licenses included here need to be compatible with GPLv2.
|
||||
See <https://en.wikipedia.org/wiki/Comparison_of_free_and_open-source_software_licenses>.
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
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 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.
|
||||
|
||||
For more information, please refer to <https://unlicense.org/>
|
||||
|
|
@ -1,181 +0,0 @@
|
|||
This is a list of licenses of the libraries distributed with SwaggerUI 4.15.5.
|
||||
|
||||
Because the minified distribution of SwaggerUI does not include these licenses,
|
||||
they are provided here separately by the MediaWiki release, for reference. See
|
||||
[T382086](https://phabricator.wikimedia.org/T382086) and
|
||||
[issue 8317](https://github.com/swagger-api/swagger-ui/issues/8317) for
|
||||
discussion.
|
||||
|
||||
Below is a table listing each library and its corresponding license, generated
|
||||
by running [license-checker](https://www.npmjs.com/package/license-checker)
|
||||
on the [swagger-ui](https://github.com/swagger-api/swagger-ui/) repo.
|
||||
The text of each license can be found in the `docs/licenses` directory of
|
||||
the MediaWiki release.
|
||||
|
||||
|module name |license |repository |
|
||||
|-------------------------------------------------------------------------|-----------------------------------|--------------------------------------------------------------------|
|
||||
|@babel/runtime-corejs3@7.18.9 |MIT |https://github.com/babel/babel |
|
||||
|@babel/runtime@7.14.8 |MIT |https://github.com/babel/babel |
|
||||
|@braintree/sanitize-url@6.0.0 |MIT |https://github.com/braintree/sanitize-url |
|
||||
|@types/hast@2.3.2 |MIT |https://github.com/DefinitelyTyped/DefinitelyTyped |
|
||||
|@types/hoist-non-react-statics@3.3.1 |MIT |https://github.com/DefinitelyTyped/DefinitelyTyped |
|
||||
|@types/prop-types@15.7.4 |MIT |https://github.com/DefinitelyTyped/DefinitelyTyped |
|
||||
|@types/react-redux@7.1.18 |MIT |https://github.com/DefinitelyTyped/DefinitelyTyped |
|
||||
|@types/react@17.0.15 |MIT |https://github.com/DefinitelyTyped/DefinitelyTyped |
|
||||
|@types/scheduler@0.16.2 |MIT |https://github.com/DefinitelyTyped/DefinitelyTyped |
|
||||
|@types/unist@2.0.6 |MIT |https://github.com/DefinitelyTyped/DefinitelyTyped |
|
||||
|@yarnpkg/lockfile@1.1.0 |BSD-2-Clause |https://github.com/yarnpkg/yarn/blob/master/packages/lockfile |
|
||||
|ansi-styles@4.3.0 |MIT |https://github.com/chalk/ansi-styles |
|
||||
|argparse@1.0.10 |MIT |https://github.com/nodeca/argparse |
|
||||
|argparse@2.0.1 |Python-2.0 |https://github.com/nodeca/argparse |
|
||||
|autolinker@3.14.3 |MIT |https://github.com/gregjacobs/Autolinker.js |
|
||||
|balanced-match@1.0.2 |MIT |https://github.com/juliangruber/balanced-match |
|
||||
|base64-js@1.5.1 |MIT |https://github.com/beatgammit/base64-js |
|
||||
|brace-expansion@1.1.11 |MIT |https://github.com/juliangruber/brace-expansion |
|
||||
|braces@3.0.2 |MIT |https://github.com/micromatch/braces |
|
||||
|call-bind@1.0.2 |MIT |https://github.com/ljharb/call-bind |
|
||||
|chalk@4.1.2 |MIT |https://github.com/chalk/chalk |
|
||||
|character-entities-legacy@1.1.4 |MIT |https://github.com/wooorm/character-entities-legacy |
|
||||
|character-entities@1.2.4 |MIT |https://github.com/wooorm/character-entities |
|
||||
|character-reference-invalid@1.1.4 |MIT |https://github.com/wooorm/character-reference-invalid |
|
||||
|ci-info@2.0.0 |MIT |https://github.com/watson/ci-info |
|
||||
|classnames@2.3.1 |MIT |https://github.com/JedWatson/classnames |
|
||||
|color-convert@2.0.1 |MIT |https://github.com/Qix-/color-convert |
|
||||
|color-name@1.1.4 |MIT |https://github.com/colorjs/color-name |
|
||||
|comma-separated-tokens@1.0.8 |MIT |https://github.com/wooorm/comma-separated-tokens |
|
||||
|concat-map@0.0.1 |MIT |https://github.com/substack/node-concat-map |
|
||||
|cookie@0.5.0 |MIT |https://github.com/jshttp/cookie |
|
||||
|copy-to-clipboard@3.3.1 |MIT |https://github.com/sudodoki/copy-to-clipboard |
|
||||
|core-js-pure@3.20.3 |MIT |https://github.com/zloirock/core-js |
|
||||
|cross-fetch@3.1.5 |MIT |https://github.com/lquixada/cross-fetch |
|
||||
|cross-spawn@6.0.5 |MIT |https://github.com/moxystudio/node-cross-spawn |
|
||||
|css.escape@1.5.1 |MIT |https://github.com/mathiasbynens/CSS.escape |
|
||||
|csstype@3.0.8 |MIT |https://github.com/frenic/csstype |
|
||||
|deep-extend@0.6.0 |MIT |https://github.com/unclechu/node-deep-extend |
|
||||
|deepmerge@4.2.2 |MIT |https://github.com/TehShrike/deepmerge |
|
||||
|dompurify@2.3.10 |(MPL-2.0 OR Apache-2.0) |https://github.com/cure53/DOMPurify |
|
||||
|drange@1.1.1 |MIT |https://github.com/fent/node-drange |
|
||||
|fast-json-patch@3.1.1 |MIT |https://github.com/Starcounter-Jack/JSON-Patch |
|
||||
|fault@1.0.4 |MIT |https://github.com/wooorm/fault |
|
||||
|fill-range@7.0.1 |MIT |https://github.com/jonschlinkert/fill-range |
|
||||
|find-yarn-workspace-root@2.0.0 |Apache-2.0 |https://github.com/square/find-yarn-workspace-root |
|
||||
|form-data-encoder@1.7.2 |MIT |https://github.com/octet-stream/form-data-encoder |
|
||||
|format@0.2.2 |MIT |https://github.com/samsonjs/format |
|
||||
|formdata-node@4.3.2 |MIT |https://github.com/octet-stream/form-data |
|
||||
|fs-extra@7.0.1 |MIT |https://github.com/jprichardson/node-fs-extra |
|
||||
|fs.realpath@1.0.0 |ISC |https://github.com/isaacs/fs.realpath |
|
||||
|function-bind@1.1.1 |MIT |https://github.com/Raynos/function-bind |
|
||||
|get-intrinsic@1.1.1 |MIT |https://github.com/ljharb/get-intrinsic |
|
||||
|glob@7.1.7 |ISC |https://github.com/isaacs/node-glob |
|
||||
|graceful-fs@4.2.10 |ISC |https://github.com/isaacs/node-graceful-fs |
|
||||
|has-flag@4.0.0 |MIT |https://github.com/sindresorhus/has-flag |
|
||||
|has-symbols@1.0.3 |MIT |https://github.com/inspect-js/has-symbols |
|
||||
|has@1.0.3 |MIT |https://github.com/tarruda/has |
|
||||
|hast-util-parse-selector@2.2.5 |MIT |https://github.com/syntax-tree/hast-util-parse-selector |
|
||||
|hastscript@6.0.0 |MIT |https://github.com/syntax-tree/hastscript |
|
||||
|highlight.js@10.7.3 |BSD-3-Clause |https://github.com/highlightjs/highlight.js |
|
||||
|hoist-non-react-statics@3.3.2 |BSD-3-Clause |https://github.com/mridgway/hoist-non-react-statics |
|
||||
|ieee754@1.2.1 |BSD-3-Clause |https://github.com/feross/ieee754 |
|
||||
|immutable@3.8.2 |MIT |https://github.com/facebook/immutable-js |
|
||||
|inflight@1.0.6 |ISC |https://github.com/npm/inflight |
|
||||
|inherits@2.0.4 |ISC |https://github.com/isaacs/inherits |
|
||||
|invariant@2.2.4 |MIT |https://github.com/zertosh/invariant |
|
||||
|is-alphabetical@1.0.4 |MIT |https://github.com/wooorm/is-alphabetical |
|
||||
|is-alphanumerical@1.0.4 |MIT |https://github.com/wooorm/is-alphanumerical |
|
||||
|is-ci@2.0.0 |MIT |https://github.com/watson/is-ci |
|
||||
|is-decimal@1.0.4 |MIT |https://github.com/wooorm/is-decimal |
|
||||
|is-docker@2.2.1 |MIT |https://github.com/sindresorhus/is-docker |
|
||||
|is-hexadecimal@1.0.4 |MIT |https://github.com/wooorm/is-hexadecimal |
|
||||
|is-number@7.0.0 |MIT |https://github.com/jonschlinkert/is-number |
|
||||
|is-plain-object@5.0.0 |MIT |https://github.com/jonschlinkert/is-plain-object |
|
||||
|is-wsl@2.2.0 |MIT |https://github.com/sindresorhus/is-wsl |
|
||||
|isexe@2.0.0 |ISC |https://github.com/isaacs/isexe |
|
||||
|js-file-download@0.4.12 |MIT |https://github.com/kennethjiang/js-file-download |
|
||||
|js-tokens@4.0.0 |MIT |https://github.com/lydell/js-tokens |
|
||||
|js-yaml@4.1.0 |MIT |https://github.com/nodeca/js-yaml |
|
||||
|jsonfile@4.0.0 |MIT |https://github.com/jprichardson/node-jsonfile |
|
||||
|klaw-sync@6.0.0 |MIT |https://github.com/manidlou/node-klaw-sync |
|
||||
|lodash.debounce@4.0.8 |MIT |https://github.com/lodash/lodash |
|
||||
|lodash@4.17.21 |MIT |https://github.com/lodash/lodash |
|
||||
|loose-envify@1.4.0 |MIT |https://github.com/zertosh/loose-envify |
|
||||
|lowlight@1.20.0 |MIT |https://github.com/wooorm/lowlight |
|
||||
|micromatch@4.0.4 |MIT |https://github.com/micromatch/micromatch |
|
||||
|minimatch@3.0.4 |ISC |https://github.com/isaacs/minimatch |
|
||||
|minimist@1.2.6 |MIT |https://github.com/substack/minimist |
|
||||
|nice-try@1.0.5 |MIT |https://github.com/electerious/nice-try |
|
||||
|node-domexception@1.0.0 |MIT |https://github.com/jimmywarting/node-domexception |
|
||||
|node-fetch@2.6.7 |MIT |https://github.com/bitinn/node-fetch |
|
||||
|object-assign@4.1.1 |MIT |https://github.com/sindresorhus/object-assign |
|
||||
|object-inspect@1.12.2 |MIT |https://github.com/inspect-js/object-inspect |
|
||||
|once@1.4.0 |ISC |https://github.com/isaacs/once |
|
||||
|open@7.4.2 |MIT |https://github.com/sindresorhus/open |
|
||||
|os-tmpdir@1.0.2 |MIT |https://github.com/sindresorhus/os-tmpdir |
|
||||
|parse-entities@2.0.0 |MIT |https://github.com/wooorm/parse-entities |
|
||||
|patch-package@6.5.0 |MIT |https://github.com/ds300/patch-package |
|
||||
|path-is-absolute@1.0.1 |MIT |https://github.com/sindresorhus/path-is-absolute |
|
||||
|path-key@2.0.1 |MIT |https://github.com/sindresorhus/path-key |
|
||||
|picomatch@2.3.0 |MIT |https://github.com/micromatch/picomatch |
|
||||
|prismjs@1.27.0 |MIT |https://github.com/PrismJS/prism |
|
||||
|prop-types@15.8.1 |MIT |https://github.com/facebook/prop-types |
|
||||
|property-information@5.6.0 |MIT |https://github.com/wooorm/property-information |
|
||||
|punycode@1.3.2 |MIT |https://github.com/bestiejs/punycode.js |
|
||||
|qs@6.11.0 |BSD-3-Clause |https://github.com/ljharb/qs |
|
||||
|querystring@0.2.0 |MIT |https://github.com/Gozala/querystring |
|
||||
|querystringify@2.2.0 |MIT |https://github.com/unshiftio/querystringify |
|
||||
|randexp@0.5.3 |MIT |https://github.com/fent/randexp.js |
|
||||
|randombytes@2.1.0 |MIT |https://github.com/crypto-browserify/randombytes |
|
||||
|react-copy-to-clipboard@5.1.0 |MIT |https://github.com/nkbt/react-copy-to-clipboard |
|
||||
|react-debounce-input@3.3.0 |MIT |https://github.com/nkbt/react-debounce-input |
|
||||
|react-dom@17.0.2 |MIT |https://github.com/facebook/react |
|
||||
|react-immutable-proptypes@2.2.0 |MIT |https://github.com/HurricaneJames/react-immutable-proptypes |
|
||||
|react-immutable-pure-component@2.2.2 |MIT |https://github.com/Monar/react-immutable-pure-component |
|
||||
|react-inspector@6.0.1 |MIT |https://github.com/xyc/react-inspector |
|
||||
|react-is@16.13.1 |MIT |https://github.com/facebook/react |
|
||||
|react-redux@7.2.4 |MIT |https://github.com/reduxjs/react-redux |
|
||||
|react-syntax-highlighter@15.5.0 |MIT |https://github.com/react-syntax-highlighter/react-syntax-highlighter|
|
||||
|react@17.0.2 |MIT |https://github.com/facebook/react |
|
||||
|redux-immutable@4.0.0 |BSD-3-Clause |https://github.com/gajus/redux-immutable |
|
||||
|redux@4.1.2 |MIT |https://github.com/reduxjs/redux |
|
||||
|refractor@3.6.0 |MIT |https://github.com/wooorm/refractor |
|
||||
|regenerator-runtime@0.13.9 |MIT |https://github.com/facebook/regenerator/tree/master/packages/runtime|
|
||||
|remarkable@2.0.1 |MIT |https://github.com/jonschlinkert/remarkable |
|
||||
|repeat-string@1.6.1 |MIT |https://github.com/jonschlinkert/repeat-string |
|
||||
|requires-port@1.0.0 |MIT |https://github.com/unshiftio/requires-port |
|
||||
|reselect@4.1.5 |MIT |https://github.com/reduxjs/reselect |
|
||||
|ret@0.2.2 |MIT |https://github.com/fent/ret.js |
|
||||
|rimraf@2.7.1 |ISC |https://github.com/isaacs/rimraf |
|
||||
|safe-buffer@5.1.2 |MIT |https://github.com/feross/safe-buffer |
|
||||
|scheduler@0.20.2 |MIT |https://github.com/facebook/react |
|
||||
|semver@5.7.1 |ISC |https://github.com/npm/node-semver |
|
||||
|serialize-error@8.1.0 |MIT |https://github.com/sindresorhus/serialize-error |
|
||||
|sha.js@2.4.11 |(MIT AND BSD-3-Clause) |https://github.com/crypto-browserify/sha.js |
|
||||
|shebang-command@1.2.0 |MIT |https://github.com/kevva/shebang-command |
|
||||
|shebang-regex@1.0.0 |MIT |https://github.com/sindresorhus/shebang-regex |
|
||||
|side-channel@1.0.4 |MIT |https://github.com/ljharb/side-channel |
|
||||
|slash@2.0.0 |MIT |https://github.com/sindresorhus/slash |
|
||||
|space-separated-tokens@1.1.5 |MIT |https://github.com/wooorm/space-separated-tokens |
|
||||
|sprintf-js@1.0.3 |BSD-3-Clause |https://github.com/alexei/sprintf.js |
|
||||
|supports-color@7.2.0 |MIT |https://github.com/chalk/supports-color |
|
||||
|swagger-client@3.18.5 |Apache-2.0 |https://github.com/swagger-api/swagger-js |
|
||||
|swagger-ui@4.15.5 |Apache-2.0 |https://github.com/swagger-api/swagger-ui |
|
||||
|tmp@0.0.33 |MIT |https://github.com/raszi/node-tmp |
|
||||
|to-regex-range@5.0.1 |MIT |https://github.com/micromatch/to-regex-range |
|
||||
|toggle-selection@1.0.6 |MIT |https://github.com/sudodoki/toggle-selection |
|
||||
|tr46@0.0.3 |MIT |https://github.com/Sebmaster/tr46.js |
|
||||
|traverse@0.6.6 |MIT |https://github.com/substack/js-traverse |
|
||||
|tslib@1.14.1 |0BSD |https://github.com/Microsoft/tslib |
|
||||
|type-fest@0.20.2 |(MIT OR CC0-1.0) |https://github.com/sindresorhus/type-fest |
|
||||
|universalify@0.1.2 |MIT |https://github.com/RyanZim/universalify |
|
||||
|url-parse@1.5.10 |MIT |https://github.com/unshiftio/url-parse |
|
||||
|url@0.11.0 |MIT |https://github.com/defunctzombie/node-url |
|
||||
|web-streams-polyfill@4.0.0-beta.1 |MIT |https://github.com/MattiasBuelens/web-streams-polyfill |
|
||||
|webidl-conversions@3.0.1 |BSD-2-Clause |https://github.com/jsdom/webidl-conversions |
|
||||
|whatwg-url@5.0.0 |MIT |https://github.com/jsdom/whatwg-url |
|
||||
|which@1.3.1 |ISC |https://github.com/isaacs/node-which |
|
||||
|wrappy@1.0.2 |ISC |https://github.com/npm/wrappy |
|
||||
|xml-but-prettier@1.0.1 |MIT |https://github.com/shockey/xml-but-prettier |
|
||||
|xml@1.0.1 |MIT |https://github.com/dylang/node-xml |
|
||||
|xtend@4.0.2 |MIT |https://github.com/Raynos/xtend |
|
||||
|yaml@1.10.2 |ISC |https://github.com/eemeli/yaml |
|
||||
|zenscroll@4.0.2 |Unlicense |https://github.com/zengabor/zenscroll |
|
||||
|
||||
|
|
@ -4241,12 +4241,6 @@ class MainConfigNames {
|
|||
*/
|
||||
public const RestAPIAdditionalRouteFiles = 'RestAPIAdditionalRouteFiles';
|
||||
|
||||
/**
|
||||
* Name constant for the RestSandboxSpecs setting, for use with Config::get()
|
||||
* @see MainConfigSchema::RestSandboxSpecs
|
||||
*/
|
||||
public const RestSandboxSpecs = 'RestSandboxSpecs';
|
||||
|
||||
/**
|
||||
* Name constant for the MaxShellMemory setting, for use with Config::get()
|
||||
* @see MainConfigSchema::MaxShellMemory
|
||||
|
|
|
|||
|
|
@ -12373,36 +12373,6 @@ class MainConfigSchema {
|
|||
'type' => 'list',
|
||||
];
|
||||
|
||||
/**
|
||||
* A list of OpenAPI specs to be made available for exploration on
|
||||
* Special:RestSandbox. If none are given, Special:RestSandbox is disabled.
|
||||
*
|
||||
* This is an associative array, arbitrary spec IDs to spec descriptions.
|
||||
* Each spec description is an array with the following keys:
|
||||
* - url: the URL that will return the OpenAPI spec.
|
||||
* - name: the name of the API, to be shown on Special:RestSandbox.
|
||||
* Ignored if msg is given.
|
||||
* - msg: a message key for the name of the API, to be shown on
|
||||
* Special:RestSandbox.
|
||||
*
|
||||
* @unstable Introduced in 1.43. We may want to rename or change this to
|
||||
* accommodate the need to list external APIs in a central discovery
|
||||
* document.
|
||||
*/
|
||||
public const RestSandboxSpecs = [
|
||||
'default' => [],
|
||||
'type' => 'map',
|
||||
'additionalProperties' => [
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'url' => [ 'type' => 'string', 'format' => 'url' ],
|
||||
'name' => [ 'type' => 'string' ],
|
||||
'msg' => [ 'type' => 'string', 'description' => 'a message key' ]
|
||||
],
|
||||
'required' => [ 'url' ]
|
||||
]
|
||||
];
|
||||
|
||||
// endregion -- End AJAX and API
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
|||
|
|
@ -2466,8 +2466,6 @@ return [
|
|||
],
|
||||
'RestAPIAdditionalRouteFiles' => [
|
||||
],
|
||||
'RestSandboxSpecs' => [
|
||||
],
|
||||
'MaxShellMemory' => 307200,
|
||||
'MaxShellFileSize' => 102400,
|
||||
'MaxShellTime' => 180,
|
||||
|
|
@ -2978,7 +2976,6 @@ return [
|
|||
'CrossSiteAJAXdomainExceptions' => 'object',
|
||||
'AllowedCorsHeaders' => 'array',
|
||||
'RestAPIAdditionalRouteFiles' => 'array',
|
||||
'RestSandboxSpecs' => 'object',
|
||||
'ShellRestrictionMethod' => [
|
||||
'string',
|
||||
'boolean',
|
||||
|
|
@ -3414,27 +3411,6 @@ return [
|
|||
'APIRequestLog' => [
|
||||
'deprecated' => 'since 1.43; use api or api-request $wgDebugLogGroups channel',
|
||||
],
|
||||
'RestSandboxSpecs' => [
|
||||
'additionalProperties' => [
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'url' => [
|
||||
'type' => 'string',
|
||||
'format' => 'url',
|
||||
],
|
||||
'name' => [
|
||||
'type' => 'string',
|
||||
],
|
||||
'msg' => [
|
||||
'type' => 'string',
|
||||
'description' => 'a message key',
|
||||
],
|
||||
],
|
||||
'required' => [
|
||||
'url',
|
||||
],
|
||||
],
|
||||
],
|
||||
'ShellboxUrls' => [
|
||||
'additionalProperties' => [
|
||||
'type' => [
|
||||
|
|
|
|||
|
|
@ -139,7 +139,6 @@ use MediaWiki\Specials\SpecialRedirect;
|
|||
use MediaWiki\Specials\SpecialRemoveCredentials;
|
||||
use MediaWiki\Specials\SpecialRenameUser;
|
||||
use MediaWiki\Specials\SpecialResetTokens;
|
||||
use MediaWiki\Specials\SpecialRestSandbox;
|
||||
use MediaWiki\Specials\SpecialRevisionDelete;
|
||||
use MediaWiki\Specials\SpecialRunJobs;
|
||||
use MediaWiki\Specials\SpecialSearch;
|
||||
|
|
@ -841,12 +840,6 @@ class SpecialPageFactory {
|
|||
'ApiSandbox' => [
|
||||
'class' => SpecialApiSandbox::class,
|
||||
],
|
||||
'RestSandbox' => [
|
||||
'class' => SpecialRestSandbox::class,
|
||||
'services' => [
|
||||
'UrlUtils',
|
||||
]
|
||||
],
|
||||
'Statistics' => [
|
||||
'class' => SpecialStatistics::class,
|
||||
'services' => [
|
||||
|
|
|
|||
|
|
@ -1,181 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* @file
|
||||
*/
|
||||
|
||||
namespace MediaWiki\Specials;
|
||||
|
||||
use MediaWiki\Html\Html;
|
||||
use MediaWiki\HTMLForm\HTMLForm;
|
||||
use MediaWiki\MainConfigNames;
|
||||
use MediaWiki\SpecialPage\SpecialPage;
|
||||
use MediaWiki\Utils\UrlUtils;
|
||||
|
||||
/**
|
||||
* A special page showing a Swagger UI for exploring REST APIs.
|
||||
*
|
||||
* @ingroup SpecialPage
|
||||
* @since 1.43
|
||||
*/
|
||||
class SpecialRestSandbox extends SpecialPage {
|
||||
|
||||
private UrlUtils $urlUtils;
|
||||
|
||||
public function __construct( UrlUtils $urlUtils ) {
|
||||
parent::__construct( 'RestSandbox' );
|
||||
|
||||
$this->urlUtils = $urlUtils;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the available choices for APIs to explore.
|
||||
*
|
||||
* @see MainConfigSchema::RestSandboxSpecs for the structure of the array
|
||||
*
|
||||
* @return array[]
|
||||
*/
|
||||
private function getApiSpecs(): array {
|
||||
return $this->getConfig()->get( MainConfigNames::RestSandboxSpecs );
|
||||
}
|
||||
|
||||
public function isListed() {
|
||||
// Hide the special pages if there are no APIs to explore.
|
||||
return $this->getApiSpecs() !== [];
|
||||
}
|
||||
|
||||
protected function getGroupName() {
|
||||
return 'wiki';
|
||||
}
|
||||
|
||||
private function getSpecUrl( ?string $apiId ): ?string {
|
||||
$apiSpecs = $this->getApiSpecs();
|
||||
|
||||
if ( $apiId !== null && $apiId !== '' ) {
|
||||
$spec = $apiSpecs[$apiId] ?? null;
|
||||
} else {
|
||||
$spec = reset( $apiSpecs ) ?: null;
|
||||
}
|
||||
|
||||
if ( !$spec ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->urlUtils->expand( $spec['url'] );
|
||||
}
|
||||
|
||||
public function execute( $sub ) {
|
||||
$this->setHeaders();
|
||||
$out = $this->getOutput();
|
||||
$this->addHelpLink( 'Help:RestSandbox' );
|
||||
|
||||
$apiId = $this->getRequest()->getText( 'api', $sub ?? '' );
|
||||
$specUrl = $this->getSpecUrl( $apiId );
|
||||
|
||||
$apiSpecs = $this->getApiSpecs();
|
||||
|
||||
$out->addJsConfigVars( [
|
||||
'specUrl' => $specUrl
|
||||
] );
|
||||
|
||||
$out->addModuleStyles( [
|
||||
'mediawiki.special',
|
||||
'mediawiki.hlist',
|
||||
'mediawiki.special.restsandbox.styles'
|
||||
] );
|
||||
|
||||
if ( !$apiSpecs ) {
|
||||
$out->addHTML( Html::errorBox(
|
||||
$out->msg( 'restsandbox-no-specs-configured' )->parse()
|
||||
) );
|
||||
return;
|
||||
}
|
||||
|
||||
$this->showForm( $apiSpecs );
|
||||
|
||||
if ( !$specUrl ) {
|
||||
$out->addHTML( Html::errorBox(
|
||||
$out->msg( 'restsandbox-no-such-api' )->params( $apiId )->parse()
|
||||
) );
|
||||
return;
|
||||
}
|
||||
|
||||
$out->addModules( [
|
||||
'mediawiki.special.restsandbox'
|
||||
] );
|
||||
|
||||
$out->addHTML( Html::openElement( 'div', [ 'id' => 'mw-restsandbox' ] ) );
|
||||
|
||||
// Hidden when JS is available
|
||||
$out->wrapWikiMsg(
|
||||
Html::element(
|
||||
'div',
|
||||
[ 'class' => [ 'mw-restsandbox-client-nojs', 'error', ], ],
|
||||
"\n$1\n"
|
||||
),
|
||||
'restsandbox-jsonly'
|
||||
);
|
||||
|
||||
// To be replaced by Swagger UI.
|
||||
$out->addElement( 'div', [ 'id' => 'mw-restsandbox-swagger-ui' ] );
|
||||
|
||||
$out->addHTML( Html::closeElement( 'div' ) ); // #mw-restsandbox
|
||||
}
|
||||
|
||||
private function showForm( array $apiSpecs ) {
|
||||
$apis = [];
|
||||
|
||||
foreach ( $apiSpecs as $key => $spec ) {
|
||||
if ( isset( $spec['msg'] ) ) {
|
||||
$text = $this->msg( $spec['msg'] )->plain();
|
||||
} elseif ( isset( $spec['name'] ) ) {
|
||||
$text = $spec['name'];
|
||||
} else {
|
||||
$text = $key;
|
||||
}
|
||||
|
||||
$apis[$text] = $key;
|
||||
}
|
||||
|
||||
$formDescriptor = [
|
||||
'intro' => [
|
||||
'type' => 'info',
|
||||
'raw' => true,
|
||||
'default' => $this->msg( 'restsandbox-text' )->parseAsBlock()
|
||||
],
|
||||
'api' => [
|
||||
'type' => 'select',
|
||||
'name' => 'api',
|
||||
'label-message' => 'restsandbox-select-api',
|
||||
'options' => $apis
|
||||
],
|
||||
'title' => [
|
||||
'type' => 'hidden',
|
||||
'name' => 'title',
|
||||
'default' => $this->getPageTitle()->getPrefixedDBkey()
|
||||
],
|
||||
];
|
||||
|
||||
$action = $this->getPageTitle()->getLocalURL( [ 'action' => 'submit' ] );
|
||||
|
||||
$htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() );
|
||||
$htmlForm->setAction( $action );
|
||||
$htmlForm->setMethod( 'GET' );
|
||||
$htmlForm->setId( 'mw-restsandbox-form' );
|
||||
$htmlForm->prepareForm()->displayForm( false );
|
||||
}
|
||||
}
|
||||
|
|
@ -4488,12 +4488,6 @@
|
|||
"newpages-showhide-patrolled": "$1 patrolled edits",
|
||||
"newpages-showhide-redirect": "$1 redirects",
|
||||
"newpages-showhide-registered": "$1 registered users",
|
||||
"restsandbox": "REST Sandbox",
|
||||
"restsandbox-text": "This page provides a query builder for REST APIs. Note that API calls will interact with live wiki content.",
|
||||
"restsandbox-select-api": "Choose the API to explore.",
|
||||
"restsandbox-no-specs-configured": "No REST APIs were configured for exploration. Use the RestExplorerSpecs setting.",
|
||||
"restsandbox-no-such-api": "The given API parameter is not supported: $1",
|
||||
"restsandbox-jsonly": "JavaScript is required to view the REST specification.",
|
||||
"blockedtext-made-by": "The block was made by $1.",
|
||||
"blockedtext-reason-comment": "The reason given is <em>$1</em>.",
|
||||
"blockedtext-start-time": "Start of block: $1",
|
||||
|
|
|
|||
|
|
@ -4758,12 +4758,6 @@
|
|||
"newpages-showhide-patrolled": "Option text in [[Special:NewPages]]. Parameters:\n* $1 - the \"show/hide\" command, with the text taken from either {{msg-mw|show}} or {{msg-mw|hide}}",
|
||||
"newpages-showhide-redirect": "Option text in [[Special:NewPages]]. Parameters:\n* $1 - the \"show/hide\" command, with the text taken from either {{msg-mw|show}} or {{msg-mw|hide}}",
|
||||
"newpages-showhide-registered": "Option text in [[Special:NewPages]]. Parameters:\n* $1 - the \"show/hide\" command, with the text taken from either {{msg-mw|show}} or {{msg-mw|hide}}",
|
||||
"restsandbox": "Title of Special:RestSandbox, also shown in the listing of special pages",
|
||||
"restsandbox-text": "Message shown at the top of Special:RestSandbox.",
|
||||
"restsandbox-select-api": "Message shown at the top of Special:RestSandbox, next to the selector for choosing an API.",
|
||||
"restsandbox-no-specs-configured": "Message shown on Special:RestSandbox when no API specs have been configured.",
|
||||
"restsandbox-no-such-api": "Message shown on Special:RestSandbox when an unknown API is requested. \n\nParameters: $1 - The unknown API identifier",
|
||||
"restsandbox-jsonly": "Message shown on Special:RestSandbox if the browser has JavaScript disabled.",
|
||||
"blockedtext-made-by": "Used as component for a block error message. $1 - the blocking sysop (with a link to their user page if they are a local user)",
|
||||
"blockedtext-reason-comment": "Used as component for a block error message. $1 - the reason for the block",
|
||||
"blockedtext-start-time": "Used as component for a block error message. $1 - the timestamp when the block started",
|
||||
|
|
|
|||
|
|
@ -422,7 +422,6 @@ $specialPageAliases = [
|
|||
'RemoveCredentials' => [ 'إزالة_الاعتمادات' ],
|
||||
'Renameuser' => [ 'إعادة_تسمية_مستخدم' ],
|
||||
'ResetTokens' => [ 'إعادة_ضبط_المفاتيح' ],
|
||||
'RestSandbox' => [ 'ملعب_رست' ],
|
||||
'Revisiondelete' => [ 'حذف_مراجعة', 'حذف_نسخة' ],
|
||||
'RunJobs' => [ 'تشغيل_الوظائف' ],
|
||||
'Search' => [ 'بحث' ],
|
||||
|
|
|
|||
|
|
@ -141,7 +141,6 @@ $specialPageAliases = [
|
|||
'RemoveCredentials' => [ 'مسح_الكريدينشيال' ],
|
||||
'Renameuser' => [ 'سمّى_تانى_يوزر' ],
|
||||
'ResetTokens' => [ 'ضبط_المفاتيح' ],
|
||||
'RestSandbox' => [ 'سبوره_رست' ],
|
||||
'Revisiondelete' => [ 'مسح_نسخه' ],
|
||||
'RunJobs' => [ 'تشغيل_الوظايف' ],
|
||||
'Search' => [ 'تدوير' ],
|
||||
|
|
|
|||
|
|
@ -510,7 +510,6 @@ $specialPageAliases = [
|
|||
'RemoveCredentials' => [ 'RemoveCredentials' ],
|
||||
'Renameuser' => [ 'RenameUser' ],
|
||||
'ResetTokens' => [ 'ResetTokens' ],
|
||||
'RestSandbox' => [ 'RestSandbox' ],
|
||||
'Revisiondelete' => [ 'RevisionDelete' ],
|
||||
'RunJobs' => [ 'RunJobs' ],
|
||||
'Search' => [ 'Search' ],
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@ $specialPageAliases = [
|
|||
'RemoveCredentials' => [ 'حذف_اعتبارنامهها' ],
|
||||
'Renameuser' => [ 'تغییر_نام_کاربر' ],
|
||||
'ResetTokens' => [ 'بازنشانی_نشانهها' ],
|
||||
'RestSandbox' => [ 'آزمایش_رست' ],
|
||||
'Revisiondelete' => [ 'حذف_نسخه' ],
|
||||
'RunJobs' => [ 'اجرای_کارها' ],
|
||||
'Search' => [ 'جستجو' ],
|
||||
|
|
|
|||
|
|
@ -235,7 +235,6 @@ $specialPageAliases = [
|
|||
'RemoveCredentials' => [ 'Usuwanie_poświadczeń', 'Usuń_poświadczenia' ],
|
||||
'Renameuser' => [ 'Zmiana_nazwy_użytkownika' ],
|
||||
'ResetTokens' => [ 'Resetuj_tokeny' ],
|
||||
'RestSandbox' => [ 'Środowisko_testowe_REST_API' ],
|
||||
'Revisiondelete' => [ 'Usuń_wersję' ],
|
||||
'RunJobs' => [ 'Uruchom_zadania' ],
|
||||
'Search' => [ 'Szukaj' ],
|
||||
|
|
|
|||
|
|
@ -259,7 +259,6 @@ $specialPageAliases = [
|
|||
'RemoveCredentials' => [ '移除凭据' ],
|
||||
'Renameuser' => [ '重命名用户' ],
|
||||
'ResetTokens' => [ '重置权标' ],
|
||||
'RestSandbox' => [ 'REST沙盒' ],
|
||||
'Revisiondelete' => [ '删除修订', '恢复修订' ],
|
||||
'RunJobs' => [ '运行工作' ],
|
||||
'Search' => [ '搜索' ],
|
||||
|
|
|
|||
|
|
@ -244,7 +244,6 @@ $specialPageAliases = [
|
|||
'RemoveCredentials' => [ '移除憑證' ],
|
||||
'Renameuser' => [ '重新命名使用者' ],
|
||||
'ResetTokens' => [ '重設密鑰', '覆寫令牌' ],
|
||||
'RestSandbox' => [ 'REST沙盒' ],
|
||||
'Revisiondelete' => [ '修訂刪除', '刪除或恢復版本' ],
|
||||
'RunJobs' => [ '執行作業', '運行工作' ],
|
||||
'Search' => [ '搜尋' ],
|
||||
|
|
|
|||
|
|
@ -2134,30 +2134,6 @@ return [
|
|||
'and'
|
||||
],
|
||||
],
|
||||
'mediawiki.special.restsandbox.styles' => [
|
||||
'styles' => [
|
||||
'resources/src/mediawiki.special.restsandbox/restsandbox.css',
|
||||
],
|
||||
],
|
||||
'mediawiki.special.restsandbox' => [
|
||||
'localBasePath' => MW_INSTALL_PATH . '/resources',
|
||||
'remoteBasePath' => "$wgResourceBasePath/resources",
|
||||
'packageFiles' => [
|
||||
"src/mediawiki.special.restsandbox/restsandbox.js",
|
||||
"lib/swagger-ui/swagger-ui-bundle.js",
|
||||
"lib/swagger-ui/swagger-ui-standalone-preset.js",
|
||||
[
|
||||
'name' => 'src/mediawiki.special.restsandbox/config.json',
|
||||
'config' => [ 'RestSandboxSpecs' ],
|
||||
],
|
||||
],
|
||||
'styles' => [
|
||||
'lib/swagger-ui/swagger-ui.css',
|
||||
],
|
||||
'dependencies' => [
|
||||
'mediawiki.special.restsandbox.styles'
|
||||
]
|
||||
],
|
||||
'mediawiki.special.block' => [
|
||||
'localBasePath' => MW_INSTALL_PATH . '/resources/src',
|
||||
'remoteBasePath' => "$wgResourceBasePath/resources/src",
|
||||
|
|
|
|||
|
|
@ -539,38 +539,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "library",
|
||||
"name": "swagger-ui",
|
||||
"version": "4.15.5",
|
||||
"licenses": [
|
||||
{
|
||||
"license": {
|
||||
"id": "Apache-2.0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kyle Shockey"
|
||||
},
|
||||
{
|
||||
"name": "Tony Tam"
|
||||
},
|
||||
{
|
||||
"name": "Vladimír Gorej"
|
||||
},
|
||||
{
|
||||
"name": "others"
|
||||
}
|
||||
],
|
||||
"externalReferences": [
|
||||
{
|
||||
"url": "https://swagger.io/tools/swagger-ui/",
|
||||
"type": "website"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "library",
|
||||
"name": "vue-demi",
|
||||
|
|
|
|||
|
|
@ -438,27 +438,6 @@ sinonjs:
|
|||
integrity: sha384-wR63Jwy75KqwBfzCmXd6gYws6uj3qV/XMAybzXrkEYGYG3AQ58ZWwr1fVpkHa5e8
|
||||
dest: sinon.js
|
||||
|
||||
swagger-ui:
|
||||
# For licenses of libraries included in the bundle, see docs/licenses/swagger-ui-licenses-5.15.5.md
|
||||
# Update along with swagger-ui and remove when no longer needed. See T382086.
|
||||
license: Apache-2.0
|
||||
homepage: https://swagger.io/tools/swagger-ui/
|
||||
version: 4.15.5
|
||||
authors: Kyle Shockey, Tony Tam, Vladimír Gorej, and others
|
||||
type: tar
|
||||
src: https://codeload.github.com/swagger-api/swagger-ui/tar.gz/refs/tags/v4.15.5
|
||||
integrity: sha384-pOwNNBDnfD+zlf8LtM3994vvCyIaaFpiyRhCRs3FI2GJ/ESZcfZ2YbJ8E4ECf+R7
|
||||
dest:
|
||||
swagger-ui-4.15.5/README.md:
|
||||
swagger-ui-4.15.5/LICENSE:
|
||||
swagger-ui-4.15.5/NOTICE:
|
||||
swagger-ui-4.15.5/dist/swagger-ui-bundle.js:
|
||||
swagger-ui-4.15.5/dist/swagger-ui-bundle.js.map:
|
||||
swagger-ui-4.15.5/dist/swagger-ui-standalone-preset.js:
|
||||
swagger-ui-4.15.5/dist/swagger-ui-standalone-preset.js.map:
|
||||
swagger-ui-4.15.5/dist/swagger-ui.css:
|
||||
swagger-ui-4.15.5/dist/swagger-ui.css.map:
|
||||
|
||||
vue-demi:
|
||||
license: MIT
|
||||
homepage: https://github.com/vueuse/vue-demi/
|
||||
|
|
|
|||
|
|
@ -1,202 +0,0 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
swagger-ui
|
||||
Copyright 2020-2021 SmartBear Software Inc.
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
# <img src="https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SWU-logo-clr.png" width="300">
|
||||
|
||||
[](http://badge.fury.io/js/swagger-ui)
|
||||
[](https://jenkins.swagger.io/view/OSS%20-%20JavaScript/job/oss-swagger-ui-master/)
|
||||
[](https://jenkins.swagger.io/job/oss-swagger-ui-security-audit/lastBuild/console)
|
||||

|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Introduction
|
||||
[Swagger UI](https://swagger.io/tools/swagger-ui/) allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place. It’s automatically generated from your OpenAPI (formerly known as Swagger) Specification, with the visual documentation making it easy for back end implementation and client side consumption.
|
||||
|
||||
## General
|
||||
**👉🏼 Want to score an easy open-source contribution?** Check out our [Good first issue](https://github.com/swagger-api/swagger-ui/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%22) label.
|
||||
|
||||
**🕰️ Looking for the older version of Swagger UI?** Refer to the [*2.x* branch](https://github.com/swagger-api/swagger-ui/tree/2.x).
|
||||
|
||||
|
||||
This repository publishes three different NPM modules:
|
||||
|
||||
* [swagger-ui](https://www.npmjs.com/package/swagger-ui) is a traditional npm module intended for use in single-page applications that are capable of resolving dependencies (via Webpack, Browserify, etc).
|
||||
* [swagger-ui-dist](https://www.npmjs.com/package/swagger-ui-dist) is a dependency-free module that includes everything you need to serve Swagger UI in a server-side project, or a single-page application that can't resolve npm module dependencies.
|
||||
* [swagger-ui-react](https://www.npmjs.com/package/swagger-ui-react) is Swagger UI packaged as a React component for use in React applications.
|
||||
|
||||
We strongly suggest that you use `swagger-ui` instead of `swagger-ui-dist` if you're building a single-page application, since `swagger-ui-dist` is significantly larger.
|
||||
|
||||
If you are looking for plain ol' HTML/JS/CSS, [download the latest release](https://github.com/swagger-api/swagger-ui/releases/latest) and copy the contents of the `/dist` folder to your server.
|
||||
|
||||
|
||||
## Compatibility
|
||||
The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatibility between Swagger UI and the OpenAPI Specification is as follows:
|
||||
|
||||
Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes
|
||||
------------------ | ------------ | -------------------------- | -----
|
||||
4.0.0 | 2021-11-03 | 2.0, 3.0 | [tag v4.0.0](https://github.com/swagger-api/swagger-ui/tree/v4.0.0)
|
||||
3.18.3 | 2018-08-03 | 2.0, 3.0 | [tag v3.18.3](https://github.com/swagger-api/swagger-ui/tree/v3.18.3)
|
||||
3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21)
|
||||
2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10)
|
||||
2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5)
|
||||
2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24)
|
||||
1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13)
|
||||
1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1)
|
||||
|
||||
## Documentation
|
||||
|
||||
#### Usage
|
||||
- [Installation](docs/usage/installation.md)
|
||||
- [Configuration](docs/usage/configuration.md)
|
||||
- [CORS](docs/usage/cors.md)
|
||||
- [OAuth2](docs/usage/oauth2.md)
|
||||
- [Deep Linking](docs/usage/deep-linking.md)
|
||||
- [Limitations](docs/usage/limitations.md)
|
||||
- [Version detection](docs/usage/version-detection.md)
|
||||
|
||||
#### Customization
|
||||
- [Overview](docs/customization/overview.md)
|
||||
- [Plugin API](docs/customization/plugin-api.md)
|
||||
- [Custom layout](docs/customization/custom-layout.md)
|
||||
|
||||
#### Development
|
||||
- [Setting up](docs/development/setting-up.md)
|
||||
- [Scripts](docs/development/scripts.md)
|
||||
|
||||
#### Contributing
|
||||
- [Contributing](https://github.com/swagger-api/.github/blob/master/CONTRIBUTING.md)
|
||||
|
||||
##### Integration Tests
|
||||
|
||||
You will need JDK of version 7 or higher as instructed here
|
||||
https://nightwatchjs.org/guide/getting-started/installation.html#install-selenium-server
|
||||
|
||||
Integration tests can be run locally with `npm run e2e` - be sure you aren't running a dev server when testing!
|
||||
|
||||
### Browser support
|
||||
Swagger UI works in the latest versions of Chrome, Safari, Firefox, and Edge.
|
||||
|
||||
### Known Issues
|
||||
|
||||
To help with the migration, here are the currently known issues with 3.X. This list will update regularly, and will not include features that were not implemented in previous versions.
|
||||
|
||||
- Only part of the parameters previously supported are available.
|
||||
- The JSON Form Editor is not implemented.
|
||||
- Support for `collectionFormat` is partial.
|
||||
- l10n (translations) is not implemented.
|
||||
- Relative path support for external files is not implemented.
|
||||
|
||||
## Security contact
|
||||
|
||||
Please disclose any security-related issues or vulnerabilities by emailing [security@swagger.io](mailto:security@swagger.io), instead of using the public issue tracker.
|
||||
|
||||
## License
|
||||
|
||||
SwaggerUI is licensed under [Apache 2.0 license](https://github.com/swagger-api/swagger-ui/blob/master/LICENSE).
|
||||
SwaggerUI comes with an explicit [NOTICE](https://github.com/swagger-api/swagger-ui/blob/master/NOTICE) file
|
||||
containing additional legal notices and information.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,38 +0,0 @@
|
|||
/**
|
||||
* Tweaks for the Swagger UI CSS to make it work inside MediaWiki
|
||||
*/
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
|
||||
/**
|
||||
* Fix title bullet background.
|
||||
*/
|
||||
.swagger-ui .info .title small pre {
|
||||
background: inherit;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* fix example code light-on-dark.
|
||||
*/
|
||||
.swagger-ui .code,
|
||||
.swagger-ui code {
|
||||
background: inherit;
|
||||
color: #fff;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide input fields until we are in "try it out" mode.
|
||||
*/
|
||||
.parameters-col_description input[ disabled ],
|
||||
.parameters-col_description select[ disabled ] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the no JavaScript error if there is JavaScript
|
||||
*/
|
||||
.client-js .mw-restsandbox-client-nojs {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/*!
|
||||
* JavaScript for Special:RestSandbox
|
||||
*/
|
||||
( function () {
|
||||
const SwaggerUI = require( './../../lib/swagger-ui/swagger-ui-bundle.js' );
|
||||
const SwaggerUIStandalonePreset = require( './../../lib/swagger-ui/swagger-ui-standalone-preset.js' );
|
||||
|
||||
const uiConfig = {
|
||||
// eslint-disable-next-line camelcase
|
||||
dom_id: '#mw-restsandbox-swagger-ui',
|
||||
presets: [
|
||||
SwaggerUI.presets.apis,
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
// specUrl is set dynamically by SpecialRestSandbox
|
||||
url: mw.config.get( 'specUrl' )
|
||||
};
|
||||
|
||||
window.ui = SwaggerUI( uiConfig );
|
||||
}() );
|
||||
Loading…
Reference in a new issue