Generate source code for a set of Python classes from a JSON schema.
Перейти к файлу
Larry Golding c4fb418bd5 Add unit tests for attr.ib generation. 2019-10-06 12:05:12 -07:00
jschema_to_python Add leading _ to private method names. 2019-10-06 11:18:47 -07:00
tests Add unit tests for attr.ib generation. 2019-10-06 12:05:12 -07:00
.gitignore Initial version of the code. 2019-09-17 16:19:32 -07:00
CODE_OF_CONDUCT.md Initial commit 2019-09-17 10:21:30 -07:00
LICENSE Initial commit 2019-09-17 10:21:33 -07:00
README.rst Fix malformed links in README. 2019-09-23 16:35:15 -07:00
SECURITY.md Initial commit 2019-09-17 10:21:31 -07:00
pytest.ini First unit test: generate a required property 2019-10-05 11:50:33 -07:00
setup.cfg Fix install_requires in setup.cfg. 2019-10-01 13:39:10 -07:00
setup.py Fix #6: Format with 'black' formatter. 2019-09-30 08:56:13 -07:00

README.rst

Этот файл содержит невидимые символы Юникода!

Этот файл содержит невидимые символы Юникода, которые могут быть отображены не так, как показано ниже. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы показать скрытые символы.

jschema-to-python
=================

Generate Python classes from a JSON schema.

Usage
=====
::

    python -m jschema_to_python [-h] -s SCHEMA_PATH -o OUTPUT_DIRECTORY [-m MODULE_NAME] -r ROOT_CLASS_NAME [-g HINTS_FILE_PATH] [-f] [-v]

    Generate source code for a set of Python classes from a JSON schema.

    optional arguments:
      -h, --help            show this help message and exit
      -s SCHEMA_PATH, --schema-path SCHEMA_PATH
                            path to the JSON schema file
      -o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
                            directory in which the generated classes will be
                            created
      -m MODULE_NAME, --module-name MODULE_NAME
                            name of the module containing the object model classes
      -r ROOT_CLASS_NAME, --root-class-name ROOT_CLASS_NAME
                            the name of the class at the root of the object model
                            represented by the schema
      -g HINTS_FILE_PATH, --hints-file-path HINTS_FILE_PATH
                            path to a file containing hints that control code
                            generation
      -f, --force           overwrite the output directory if it exists
      -v, --verbose         increase output verbosity (may be specified up to two
                            times)

Contributing
============

This project welcomes contributions and suggestions.  Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the `Microsoft Open Source Code of Conduct <https://opensource.microsoft.com/codeofconduct/>`_.
For more information see the `Code of Conduct FAQ <https://opensource.microsoft.com/codeofconduct/faq/>`_ or
contact `opencode@microsoft.com <mailto:opencode@microsoft.com>`_ with any additional questions or comments.