From 3cde25b626f33fdc7b75393cb0a943bacfba13f2 Mon Sep 17 00:00:00 2001 From: Emanuele Panzeri <226021+thePanz@users.noreply.github.com> Date: Tue, 29 Mar 2022 09:26:05 +0200 Subject: [PATCH] Add Jane-php recipe for v7 releases (#1377) See changes applied for new namespaces: - https://github.com/janephp/janephp/commit/806687e995022604dccbdd5fc83d07649abf8d30 --- .../7.0/bin/jane-json-schema-generate | 15 +++++++++++++++ .../json-schema/7.0/config/jane/json_schema.php | 8 ++++++++ .../json-schema/7.0/config/packages/jane.yaml | 6 ++++++ jane-php/json-schema/7.0/manifest.json | 9 +++++++++ jane-php/json-schema/7.0/post-install.txt | 8 ++++++++ .../7.0/bin/jane-open-api-generate | 16 ++++++++++++++++ .../open-api-common/7.0/config/jane/open_api.php | 7 +++++++ .../7.0/config/packages/jane.yaml | 6 ++++++ jane-php/open-api-common/7.0/manifest.json | 9 +++++++++ jane-php/open-api-common/7.0/post-install.txt | 8 ++++++++ 10 files changed, 92 insertions(+) create mode 100755 jane-php/json-schema/7.0/bin/jane-json-schema-generate create mode 100644 jane-php/json-schema/7.0/config/jane/json_schema.php create mode 100644 jane-php/json-schema/7.0/config/packages/jane.yaml create mode 100644 jane-php/json-schema/7.0/manifest.json create mode 100644 jane-php/json-schema/7.0/post-install.txt create mode 100755 jane-php/open-api-common/7.0/bin/jane-open-api-generate create mode 100644 jane-php/open-api-common/7.0/config/jane/open_api.php create mode 100644 jane-php/open-api-common/7.0/config/packages/jane.yaml create mode 100644 jane-php/open-api-common/7.0/manifest.json create mode 100644 jane-php/open-api-common/7.0/post-install.txt diff --git a/jane-php/json-schema/7.0/bin/jane-json-schema-generate b/jane-php/json-schema/7.0/bin/jane-json-schema-generate new file mode 100755 index 00000000..24ff97d8 --- /dev/null +++ b/jane-php/json-schema/7.0/bin/jane-json-schema-generate @@ -0,0 +1,15 @@ +#!/usr/bin/env php + __DIR__ . '/../config/jane/json_schema.php'], $command->getDefinition()); + +$command->execute($inputArray, new NullOutput()); diff --git a/jane-php/json-schema/7.0/config/jane/json_schema.php b/jane-php/json-schema/7.0/config/jane/json_schema.php new file mode 100644 index 00000000..83506b6c --- /dev/null +++ b/jane-php/json-schema/7.0/config/jane/json_schema.php @@ -0,0 +1,8 @@ + __DIR__ . '/json-schema.json', + 'root-class' => 'MyModel', + 'namespace' => 'MyApp\Library\Generated', + 'directory' => __DIR__ . '/../../generated', +]; diff --git a/jane-php/json-schema/7.0/config/packages/jane.yaml b/jane-php/json-schema/7.0/config/packages/jane.yaml new file mode 100644 index 00000000..4bc2f383 --- /dev/null +++ b/jane-php/json-schema/7.0/config/packages/jane.yaml @@ -0,0 +1,6 @@ +services: + _defaults: + autowire: true + autoconfigure: true + +# MyApp\Library\Generated\Normalizer\JaneObjectNormalizer: null diff --git a/jane-php/json-schema/7.0/manifest.json b/jane-php/json-schema/7.0/manifest.json new file mode 100644 index 00000000..a55f0fce --- /dev/null +++ b/jane-php/json-schema/7.0/manifest.json @@ -0,0 +1,9 @@ +{ + "copy-from-recipe": { + "bin/": "%BIN_DIR%/", + "config/": "%CONFIG_DIR%/" + }, + "conflict": { + "symfony/symfony": "<5.0" + } +} diff --git a/jane-php/json-schema/7.0/post-install.txt b/jane-php/json-schema/7.0/post-install.txt new file mode 100644 index 00000000..f49672cf --- /dev/null +++ b/jane-php/json-schema/7.0/post-install.txt @@ -0,0 +1,8 @@ + * Finish package configuration: + 1. Configure config/jane/json_schema.php with your specification details + 2. Run bin/jane-json-schema-generate + 3. Add generated/ directory to your composer autoload definition (eg. "MyApp\\Library\\Generated\\": "generated/") + 4. Open config/packages/jane.yaml and replace MyApp\Library\Generated\ namespace with your generated namespace. + 5. Then remove line comments + +Documentation: https://jane.readthedocs.io/en/latest/ diff --git a/jane-php/open-api-common/7.0/bin/jane-open-api-generate b/jane-php/open-api-common/7.0/bin/jane-open-api-generate new file mode 100755 index 00000000..7f5f95a6 --- /dev/null +++ b/jane-php/open-api-common/7.0/bin/jane-open-api-generate @@ -0,0 +1,16 @@ +#!/usr/bin/env php + __DIR__ . '/../config/jane/open_api.php'], $command->getDefinition()); + +$command->execute($inputArray, new NullOutput()); diff --git a/jane-php/open-api-common/7.0/config/jane/open_api.php b/jane-php/open-api-common/7.0/config/jane/open_api.php new file mode 100644 index 00000000..cc34865e --- /dev/null +++ b/jane-php/open-api-common/7.0/config/jane/open_api.php @@ -0,0 +1,7 @@ + __DIR__ . '/open-api.yaml', + 'namespace' => 'MyApp\Library\Generated', + 'directory' => __DIR__ . '/../../generated', +]; diff --git a/jane-php/open-api-common/7.0/config/packages/jane.yaml b/jane-php/open-api-common/7.0/config/packages/jane.yaml new file mode 100644 index 00000000..4bc2f383 --- /dev/null +++ b/jane-php/open-api-common/7.0/config/packages/jane.yaml @@ -0,0 +1,6 @@ +services: + _defaults: + autowire: true + autoconfigure: true + +# MyApp\Library\Generated\Normalizer\JaneObjectNormalizer: null diff --git a/jane-php/open-api-common/7.0/manifest.json b/jane-php/open-api-common/7.0/manifest.json new file mode 100644 index 00000000..a55f0fce --- /dev/null +++ b/jane-php/open-api-common/7.0/manifest.json @@ -0,0 +1,9 @@ +{ + "copy-from-recipe": { + "bin/": "%BIN_DIR%/", + "config/": "%CONFIG_DIR%/" + }, + "conflict": { + "symfony/symfony": "<5.0" + } +} diff --git a/jane-php/open-api-common/7.0/post-install.txt b/jane-php/open-api-common/7.0/post-install.txt new file mode 100644 index 00000000..b96c3021 --- /dev/null +++ b/jane-php/open-api-common/7.0/post-install.txt @@ -0,0 +1,8 @@ + * Finish package configuration: + 1. Configure config/jane/open_api.php with your specification details + 2. Run bin/jane-open-api-generate + 3. Add generated/ directory to your composer autoload definition (eg. "MyApp\\Library\\Generated\\": "generated/") + 4. Open config/packages/jane.yaml and replace MyApp\Library\Generated\ namespace with your generated namespace. + 5. Then remove line comments + +Documentation: https://jane.readthedocs.io/en/latest/