├── tox.ini ├── MAINTAINERS ├── openapi_cli_client ├── __init__.py ├── __main__.py └── cli.py ├── requirements.txt ├── .gitignore ├── .travis.yml ├── tests ├── test_cli.py └── fixtures │ └── petstore.yaml ├── README.rst ├── setup.py └── LICENSE /tox.ini: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length=120 3 | 4 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Henning Jacobs 2 | -------------------------------------------------------------------------------- /openapi_cli_client/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '0.1' 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | clickclick 3 | bravado 4 | bravado-core 5 | -------------------------------------------------------------------------------- /openapi_cli_client/__main__.py: -------------------------------------------------------------------------------- 1 | import openapi_cli_client.cli 2 | 3 | if __name__ == '__main__': 4 | openapi_cli_client.cli.main() 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 2 | /.idea 3 | *.iml 4 | 5 | # test yaml files 6 | /*.yaml 7 | 8 | # Python 9 | *.pyc 10 | *.egg* 11 | coverage.xml 12 | junit.xml 13 | .coverage 14 | dist/ 15 | build/ 16 | htmlcov/ 17 | .cache/ 18 | 19 | # Vi 20 | *.sw* 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | matrix: 3 | include: 4 | - python: 3.4 5 | - python: 3.5 6 | install: 7 | - pip install -r requirements.txt 8 | - pip install coveralls 9 | script: 10 | - python setup.py test 11 | - python setup.py flake8 12 | after_success: 13 | - coveralls 14 | -------------------------------------------------------------------------------- /tests/test_cli.py: -------------------------------------------------------------------------------- 1 | import click 2 | import os 3 | from openapi_cli_client.cli import generate_cli 4 | 5 | def test_generate_cli(): 6 | cli = generate_cli(os.path.join(os.path.dirname(__file__), 'fixtures/petstore.yaml')) 7 | assert isinstance(cli, click.Group) 8 | assert 'pets' in cli.commands 9 | commands = cli.commands['pets'].commands 10 | assert 4 == len(commands) 11 | assert 'list' in commands 12 | assert 'get' in commands 13 | assert 'delete' in commands 14 | assert 'update' in commands 15 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ========================== 2 | OpenAPI/Swagger CLI Client 3 | ========================== 4 | 5 | Python command line client for REST APIs defined with `OpenAPI-Spec`_/Swagger-Spec. 6 | 7 | This tool maps REST API operations to `Click`_ CLI commands. 8 | 9 | **WORK IN PROGRESS** 10 | 11 | 12 | Usage 13 | ===== 14 | 15 | .. code-block:: bash 16 | 17 | $ sudo pip3 install -U openapi-cli-client 18 | $ openapi-cli-client http://petstore.swagger.io/v2/swagger.json pet get myid 19 | 20 | 21 | .. _OpenAPI-Spec: https://github.com/OAI/OpenAPI-Specification/ 22 | .. _Click: http://click.pocoo.org/ 23 | -------------------------------------------------------------------------------- /openapi_cli_client/cli.py: -------------------------------------------------------------------------------- 1 | import click 2 | import clickclick 3 | import re 4 | import requests 5 | import sys 6 | import yaml 7 | 8 | from functools import partial 9 | from bravado_core.spec import Spec 10 | from bravado.client import construct_request 11 | from bravado.requests_client import RequestsClient 12 | 13 | CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) 14 | 15 | REPLACEABLE_COMMAND_CHARS = re.compile('[^a-z0-9]+') 16 | 17 | 18 | def normalize_command_name(s): 19 | ''' 20 | >>> normalize_command_name('My Pets') 21 | 'my-pets' 22 | 23 | >>> normalize_command_name('.foo.bar.') 24 | 'foo-bar' 25 | ''' 26 | return REPLACEABLE_COMMAND_CHARS.sub('-', s.lower()).strip('-') 27 | 28 | 29 | def get_command_name(op): 30 | if op.http_method == 'get' and '{' not in op.path_name: 31 | return 'list' 32 | elif op.http_method == 'put': 33 | return 'update' 34 | else: 35 | return op.http_method 36 | 37 | 38 | def invoke(op, *args, **kwargs): 39 | if op.http_method != 'get': 40 | clickclick.action('Invoking..') 41 | request = construct_request(op, {}, **kwargs) 42 | c = RequestsClient() 43 | future = c.request(request) 44 | future.result() 45 | clickclick.ok() 46 | 47 | 48 | def sanitize_spec(spec): 49 | 50 | for path, path_obj in list(spec['paths'].items()): 51 | # remove root paths as no resource name can be found for it 52 | if path == '/': 53 | del spec['paths'][path] 54 | return spec 55 | 56 | 57 | def generate_cli(spec): 58 | origin_url = None 59 | if isinstance(spec, str): 60 | if spec.startswith('https://') or spec.startswith('http://'): 61 | origin_url = spec 62 | r = requests.get(spec) 63 | r.raise_for_status() 64 | spec = yaml.safe_load(r.text) 65 | else: 66 | with open(spec, 'rb') as fd: 67 | spec = yaml.safe_load(fd.read()) 68 | 69 | spec = sanitize_spec(spec) 70 | 71 | cli = clickclick.AliasedGroup(context_settings=CONTEXT_SETTINGS) 72 | 73 | spec = Spec.from_dict(spec, origin_url=origin_url) 74 | for res_name, res in spec.resources.items(): 75 | grp = clickclick.AliasedGroup(normalize_command_name(res_name), short_help='Manage {}'.format(res_name)) 76 | cli.add_command(grp) 77 | for op_name, op in res.operations.items(): 78 | name = get_command_name(op) 79 | 80 | cmd = click.Command(name, callback=partial(invoke, op=op), short_help=op.op_spec.get('summary')) 81 | for param_name, param in op.params.items(): 82 | if param.required: 83 | arg = click.Argument([param.name]) 84 | cmd.params.append(arg) 85 | else: 86 | arg = click.Option(['--' + param.name]) 87 | cmd.params.append(arg) 88 | 89 | grp.add_command(cmd) 90 | 91 | return cli 92 | 93 | 94 | def main(): 95 | if len(sys.argv) < 2: 96 | sys.stderr.write('Missing OpenAPI spec argument\n') 97 | sys.exit(1) 98 | cli = generate_cli(sys.argv[1]) 99 | sys.argv = sys.argv[:1] + sys.argv[2:] 100 | cli() 101 | -------------------------------------------------------------------------------- /tests/fixtures/petstore.yaml: -------------------------------------------------------------------------------- 1 | swagger: '2.0' 2 | info: 3 | title: Pet Shop Example API 4 | version: "0.1" 5 | consumes: 6 | - application/json 7 | produces: 8 | - application/json 9 | security: 10 | # enable OAuth protection for all REST endpoints 11 | # (only active if the HTTP_TOKENINFO_URL environment variable is set) 12 | - oauth2: [uid] 13 | paths: 14 | /pets: 15 | get: 16 | tags: [Pets] 17 | operationId: app.get_pets 18 | summary: Get all pets 19 | parameters: 20 | - name: animal_type 21 | in: query 22 | type: string 23 | pattern: "^[a-zA-Z0-9]*$" 24 | - name: limit 25 | in: query 26 | type: integer 27 | minimum: 0 28 | default: 100 29 | responses: 30 | '200': 31 | description: Return pets 32 | schema: 33 | type: array 34 | items: 35 | $ref: '#/definitions/Pet' 36 | /pets/{pet_id}: 37 | get: 38 | tags: [Pets] 39 | operationId: app.get_pet 40 | summary: Get a single pet 41 | parameters: 42 | - $ref: '#/parameters/pet_id' 43 | responses: 44 | '200': 45 | description: Return pet 46 | schema: 47 | $ref: '#/definitions/Pet' 48 | '404': 49 | description: Pet does not exist 50 | put: 51 | tags: [Pets] 52 | operationId: app.put_pet 53 | summary: Create or update a pet 54 | parameters: 55 | - $ref: '#/parameters/pet_id' 56 | - name: pet 57 | in: body 58 | schema: 59 | $ref: '#/definitions/Pet' 60 | responses: 61 | '200': 62 | description: Pet updated 63 | '201': 64 | description: New pet created 65 | delete: 66 | tags: [Pets] 67 | operationId: app.delete_pet 68 | summary: Remove a pet 69 | parameters: 70 | - $ref: '#/parameters/pet_id' 71 | responses: 72 | '204': 73 | description: Pet was deleted 74 | '404': 75 | description: Pet does not exist 76 | 77 | 78 | parameters: 79 | pet_id: 80 | name: pet_id 81 | description: Pet's Unique identifier 82 | in: path 83 | type: string 84 | required: true 85 | pattern: "^[a-zA-Z0-9-]+$" 86 | 87 | definitions: 88 | Pet: 89 | type: object 90 | required: 91 | - name 92 | - animal_type 93 | properties: 94 | id: 95 | type: string 96 | description: Unique identifier 97 | example: "123" 98 | readOnly: true 99 | name: 100 | type: string 101 | description: Pet's name 102 | example: "Susie" 103 | minLength: 1 104 | maxLength: 100 105 | animal_type: 106 | type: string 107 | description: Kind of animal 108 | example: "cat" 109 | minLength: 1 110 | tags: 111 | type: object 112 | description: Custom tags 113 | created: 114 | type: string 115 | format: date-time 116 | description: Creation time 117 | example: "2015-07-07T15:49:51.230+02:00" 118 | readOnly: true 119 | 120 | 121 | securityDefinitions: 122 | oauth2: 123 | type: oauth2 124 | flow: implicit 125 | authorizationUrl: https://example.com/oauth2/dialog 126 | scopes: 127 | uid: Unique identifier of the user accessing the service. 128 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | import os 6 | import inspect 7 | 8 | import setuptools 9 | from setuptools.command.test import test as TestCommand 10 | from setuptools import setup 11 | 12 | if sys.version_info < (3, 4, 0): 13 | sys.stderr.write('FATAL: OpenAPI CLI Client needs to be run with Python 3.4+\n') 14 | sys.exit(1) 15 | 16 | __location__ = os.path.join(os.getcwd(), os.path.dirname(inspect.getfile(inspect.currentframe()))) 17 | 18 | 19 | def read_version(package): 20 | with open(os.path.join(package, '__init__.py'), 'r') as fd: 21 | for line in fd: 22 | if line.startswith('__version__ = '): 23 | return line.split()[-1].strip().strip("'") 24 | 25 | NAME = 'openapi-cli-client' 26 | MAIN_PACKAGE = 'openapi_cli_client' 27 | VERSION = read_version(MAIN_PACKAGE) 28 | DESCRIPTION = 'OpenAPI/Swagger CLI Client' 29 | LICENSE = 'Apache License 2.0' 30 | URL = 'https://github.com/zalando/openapi-cli-client' 31 | AUTHOR = 'Henning Jacobs' 32 | EMAIL = 'henning.jacobs@zalando.de' 33 | KEYWORDS = 'openapi swagger rest api cli client' 34 | 35 | COVERAGE_XML = True 36 | COVERAGE_HTML = False 37 | JUNIT_XML = True 38 | 39 | # Add here all kinds of additional classifiers as defined under 40 | # https://pypi.python.org/pypi?%3Aaction=list_classifiers 41 | CLASSIFIERS = [ 42 | 'Development Status :: 4 - Beta', 43 | 'Environment :: Console', 44 | 'Intended Audience :: Developers', 45 | 'Intended Audience :: System Administrators', 46 | 'License :: OSI Approved :: Apache Software License', 47 | 'Operating System :: POSIX :: Linux', 48 | 'Programming Language :: Python', 49 | 'Programming Language :: Python :: 3.4', 50 | 'Programming Language :: Python :: 3.5', 51 | 'Programming Language :: Python :: Implementation :: CPython', 52 | ] 53 | 54 | CONSOLE_SCRIPTS = ['openapi-cli-client = openapi_cli_client.cli:main'] 55 | 56 | 57 | class PyTest(TestCommand): 58 | 59 | user_options = [('cov=', None, 'Run coverage'), ('cov-xml=', None, 'Generate junit xml report'), ('cov-html=', 60 | None, 'Generate junit html report'), ('junitxml=', None, 'Generate xml of test results')] 61 | 62 | def initialize_options(self): 63 | TestCommand.initialize_options(self) 64 | self.cov = None 65 | self.cov_xml = False 66 | self.cov_html = False 67 | self.junitxml = None 68 | 69 | def finalize_options(self): 70 | TestCommand.finalize_options(self) 71 | if self.cov is not None: 72 | self.cov = ['--cov', self.cov, '--cov-report', 'term-missing'] 73 | if self.cov_xml: 74 | self.cov.extend(['--cov-report', 'xml']) 75 | if self.cov_html: 76 | self.cov.extend(['--cov-report', 'html']) 77 | if self.junitxml is not None: 78 | self.junitxml = ['--junitxml', self.junitxml] 79 | 80 | def run_tests(self): 81 | try: 82 | import pytest 83 | except: 84 | raise RuntimeError('py.test is not installed, run: pip install pytest') 85 | params = {'args': self.test_args} 86 | if self.cov: 87 | params['args'] += self.cov 88 | if self.junitxml: 89 | params['args'] += self.junitxml 90 | params['args'] += ['--doctest-modules', MAIN_PACKAGE, '-s', '-vv'] 91 | errno = pytest.main(**params) 92 | sys.exit(errno) 93 | 94 | 95 | def get_install_requirements(path): 96 | content = open(os.path.join(__location__, path)).read() 97 | return [req for req in content.split('\\n') if req != ''] 98 | 99 | 100 | def read(fname): 101 | return open(os.path.join(__location__, fname)).read() 102 | 103 | 104 | def setup_package(): 105 | # Assemble additional setup commands 106 | cmdclass = {} 107 | cmdclass['test'] = PyTest 108 | 109 | install_reqs = get_install_requirements('requirements.txt') 110 | 111 | command_options = {'test': {'test_suite': ('setup.py', 'tests'), 'cov': ('setup.py', MAIN_PACKAGE)}} 112 | if JUNIT_XML: 113 | command_options['test']['junitxml'] = 'setup.py', 'junit.xml' 114 | if COVERAGE_XML: 115 | command_options['test']['cov_xml'] = 'setup.py', True 116 | if COVERAGE_HTML: 117 | command_options['test']['cov_html'] = 'setup.py', True 118 | 119 | setup( 120 | name=NAME, 121 | version=VERSION, 122 | url=URL, 123 | description=DESCRIPTION, 124 | author=AUTHOR, 125 | author_email=EMAIL, 126 | license=LICENSE, 127 | keywords=KEYWORDS, 128 | long_description=read('README.rst'), 129 | classifiers=CLASSIFIERS, 130 | test_suite='tests', 131 | packages=setuptools.find_packages(exclude=['tests', 'tests.*']), 132 | install_requires=install_reqs, 133 | setup_requires=['flake8'], 134 | cmdclass=cmdclass, 135 | tests_require=['pytest-cov', 'pytest'], 136 | command_options=command_options, 137 | entry_points={'console_scripts': CONSOLE_SCRIPTS}, 138 | ) 139 | 140 | 141 | if __name__ == '__main__': 142 | setup_package() 143 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2015 Zalando SE 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | --------------------------------------------------------------------------------