Jane is a set of libraries to generate Models & API Clients based on JsonSchema / OpenAPI specs

Overview
Comments
  • Non required property + nullable

    Non required property + nullable

    Jane version(s) affected: 6.1.0

    (maybe other versions)

    Description

    When a property is non-required and not explicitly set, it must not be send in the request payload. Typically used in PATCH requests.

    I have an entity with a property that can be non-null or null. Behind the scene, a null value erase the data...

    It may be not the good way to do it, idk. But anyway a PATCH is intended for partial update.

    How to reproduce

    Here is a minimal example: https://github.com/Gounlaf/janephp-bug-nullable-nonrequired

    Possible Solution

    In other language (Java/Kotlin) there are library that provide an Optional type. I found an implementation by iFixit here: https://github.com/iFixit/php7-optional. It might help to support it correctly.

    Regards,

    bug 
    opened by Gounlaf 25
  • Fatal Error - $context empty in SchemaNormalizer

    Fatal Error - $context empty in SchemaNormalizer

    When running janephp v4 for an openapi v2.0 swagger file, after about 40 minutes I get this error:

    PHP Notice:  Undefined index: document-origin in /home/user/projects/janephp/vendor/jane-php/open-api/Normalizer/SchemaNormalizer.php on line 43
    PHP Stack trace:
    PHP   1. {main}() /home/user/projects/janephp/vendor/jane-php/open-api/bin/jane-openapi:0
    PHP   2. Jane\OpenApi\Application->run() /home/user/projects/janephp/vendor/jane-php/open-api/bin/jane-openapi:22
    PHP   3. Jane\OpenApi\Application->doRun() /home/user/projects/janephp/vendor/symfony/console/Application.php:148
    PHP   4. Jane\OpenApi\Application->doRunCommand() /home/user/projects/janephp/vendor/symfony/console/Application.php:272
    PHP   5. Jane\OpenApi\Command\GenerateCommand->run() /home/user/projects/janephp/vendor/symfony/console/Application.php:1011
    PHP   6. Jane\OpenApi\Command\GenerateCommand->execute() /home/user/projects/janephp/vendor/symfony/console/Command/Command.php:255
    PHP   7. Jane\OpenApi\JaneOpenApi->generate() /home/user/projects/janephp/vendor/jane-php/open-api/Command/GenerateCommand.php:69
    PHP   8. Jane\OpenApi\Generator\Psr18ClientGenerator->generate() /home/user/projects/janephp/vendor/jane-php/json-schema/Generator/ChainGenerator.php:28
    PHP   9. Jane\OpenApi\Generator\Psr7OperationGenerator->createOperation() /home/user/projects/janephp/vendor/jane-php/open-api/Generator/ClientGenerator.php:43
    PHP  10. Jane\OpenApi\Generator\Psr7EndpointGenerator->createEndpointClass() /home/user/projects/janephp/vendor/jane-php/open-api/Generator/OperationGenerator.php:33
    PHP  11. Jane\OpenApi\Generator\Psr7EndpointGenerator->getConstructor() /home/user/projects/janephp/vendor/jane-php/open-api/Generator/EndpointGenerator.php:74
    PHP  12. Jane\OpenApi\Generator\Psr7EndpointGenerator->resolveParameter() /home/user/projects/janephp/vendor/jane-php/open-api/Generator/EndpointGenerator.php:145
    PHP  13. Jane\JsonSchemaRuntime\Reference->resolve() /home/user/projects/janephp/vendor/jane-php/open-api/Generator/EndpointGenerator.php:647
    PHP  14. Jane\OpenApi\Generator\Psr7EndpointGenerator->Jane\OpenApi\Generator\{closure:/home/user/projects/janephp/vendor/jane-php/open-api/Generator/EndpointGenerator.php:629-647}() /home/user/projects/janephp/vendor/jane-php/json-schema-runtime/Reference.php:68
    PHP  15. Symfony\Component\Serializer\Serializer->denormalize() /home/user/projects/janephp/vendor/jane-php/open-api/Generator/EndpointGenerator.php:631
    PHP  16. Jane\OpenApi\Normalizer\BodyParameterNormalizer->denormalize() /home/user/projects/janephp/vendor/symfony/serializer/Serializer.php:191
    PHP  17. Symfony\Component\Serializer\Serializer->denormalize() /home/user/projects/janephp/vendor/jane-php/open-api/Normalizer/BodyParameterNormalizer.php:64
    PHP  18. Jane\OpenApi\Normalizer\SchemaNormalizer->denormalize() /home/user/projects/janephp/vendor/symfony/serializer/Serializer.php:191
    
    PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Jane\JsonSchemaRuntime\Reference::__construct() must be of the type string, null given, called in /home/user/projects/janephp/vendor/jane-php/open-api/Normalizer/SchemaNormalizer.php on line 43 and defined in /home/user/projects/janephp/vendor/jane-php/json-schema-runtime/Reference.php:28
    Stack trace:
    #0 /home/user/projects/janephp/vendor/jane-php/open-api/Normalizer/SchemaNormalizer.php(43): Jane\JsonSchemaRuntime\Reference->__construct('#/definitions/S...', NULL)
    #1 /home/user/projects/janephp/vendor/symfony/serializer/Serializer.php(191): Jane\OpenApi\Normalizer\SchemaNormalizer->denormalize(Object(stdClass), 'Jane\\OpenApi\\Mo...', 'json', Array)
    #2 /home/user/projects/janephp/vendor/jane-php/open-api/Normalizer/BodyParameterNormalizer.php(64): Symfony\Component\Serializer\Serializer->denormalize(Object(stdClass), 'Jane\\OpenApi\\Mo...', 'jso in /home/user/projects/janephp/vendor/jane-php/json-schema-runtime/Reference.php on line 28
    

    If necessary I can provide the swagger file on request, but it looks more like a general issue to me (missing validation if $context['document-origin'] is present).

    bug 4.x 
    opened by Niehztog 20
  • Error on references in requestbody

    Error on references in requestbody

    Fixes #225

    I stumbled open

    Uncaught TypeError: Argument 1 passed to Jane\OpenApi\Generator\RequestBodyGenerator::getSerializeStatements() must be an instance of Jane\OpenApi\JsonSchema\Model\RequestBody or null, instance of Jane\JsonSchemaRuntime\Reference
    

    and

    Call to undefined method Jane\JsonSchemaRuntime\Reference::getContent()
    

    when using an openapi specification with references in the request body. This is not an optimal fix but this will at least end up in a generated client. Whether the client is working correctly is still something to find out. I cannot provide a minimal example yet as I have to reduce the problem.

    For now I need some feedback on that error and hints on solving this over all in this library.

    review needed 
    opened by JoshuaBehrens 14
  • Question: How do I tell Jane to generate models with required/ nullable fields?

    Question: How do I tell Jane to generate models with required/ nullable fields?

    In my JSON file I have the OpenApi "required" section to define the required fields. But when Jane generates the JSON Models it makes everything nullable, which is a problem, when I want the required fields to be not nullable. Also it doesn't put |null in the doc block.

    Is there a config option? Or is this a bug?

    question 4.x 
    opened by angelsk 14
  • Parametrizing the host address

    Parametrizing the host address

    We have several places running the same API and we want to be able to configure our applications which one to use based on the environment (dev, test, prod). This is not possible when hardcoding the host: xxx field into the spec.

    The documentation mentions that it should be possible to handle these cases. However, I could not find a way to do:

    • Keep the basePath in the spec (it will not change)
    • Be able to parametrize the host, probably while the Client class is being created.

    Looking at the code, I seem to have the following problem. When host is not provided, the Client::create() factory method will not contain the AddHostPlugin() call. There is no way for me to pass this plugin into the create call, however. I can only provide the whole $httpClient instance. I don't understand how to keep most of the default client creation and only provide the host URL, the single plugin.

    It seems to me that with the current functionality, I have two options:

    • Provide both host and basePath and be locked to a single host url
    • Manually parse the spec file for basePath and create a custom $httpClient instance. I have to parse the spec because I cannot read the basePath value anywhere

    Am I missing something?

    This gist shows the create functions I am talking about: https://gist.github.com/melkamar/f98e8996dc55a2e457a6efeed2154ee1

    Thanks!

    enhancement 
    opened by melkamar 14
  • Content-Type can be mistyped by schema

    Content-Type can be mistyped by schema

    When a schema file provides a required header Content-Type it will influence the type check for the header that is auto generated by jane. This later conflicts with the options resolver as it expects it to be the type of the schema and not the auto generated array. This change will ensure it is at least of type array.

    Regarding the options resolver and content types I rearranged the passed headers as the generated Content-Type header is marked defined and required but the headers that are checked by the options resolver do not include the auto generated Content-Type header and therefore fail due to being "non-"existing.

    opened by JoshuaBehrens 13
  • [Automapper] Cannot map Ramsey/UuidInterface field

    [Automapper] Cannot map Ramsey/UuidInterface field

    Hey,

    I'm trying to use janephp/automapper-bundle to map User entity to its doctrine equivalent DoctrineUser. Both them have propery $id that has type Ramsey\Uuid\UuidInterface. So when I use map($user, $doctrineUser) I get the error "Cannot instantiate interface Ramsey\Uuid\UuidInterface". Is there any solution that helps me to handle this?

    Thanks :)

    Class examples:

    class User {
        public function __construct(
            private UuidInterface $id,
            private string $email,
            private string $roles,
        ) {}
    
    
    
        // getters and other functions //
    }
    
    /**
     * @ORM\Table("users")
     * @ORM\Entity(repositoryClass=UserRepository::class)
     */
    class DoctrineUser implements UserInterface, PasswordAuthenticatedUserInterface {
        /**
         * @ORM\Id
         * @ORM\Column(type="uuid")
         */
        private UuidInterface $id;
    
        /**
         * @ORM\Column(type="string", length=180, unique=true)
         */
        private string $email;
    
        /**
         * @ORM\Column(type="json")
         */
        private array $roles = [];
    
        /**
         * @ORM\Column(type="string")
         */
        private string $password;
    
    
    
        // getters and setters //
    }
    
    class UserRepository extends ServiceEntityRepository {
        // constructor //
    
        public function create(User $user, string $password): void
        {
            $doctrineUser = new DoctrineUser();
            $this->automapper->map($user, $doctrineUser); // <-----------------
            $doctrineUser->setPassword($password);
    
            $this->save($doctrineUser);
        }
    }
    
    opened by andriy200017 11
  • Error generating model with open-api-runtime

    Error generating model with open-api-runtime

    Jane version(s) affected: open-api-runtime 6.1.1

    Description
    Tried to generate a model for https://api.poc-picturepark.com/docs/rest/PictureparkSwagger.json, got this error:

    PHP Fatal error:  Uncaught Error: Call to a member function getDescription() on array in /vendor/jane-php/open-api-3/Generator/Endpoint/GetTransformResponseBodyTrait.php:43
    Stack trace:
    #0 /vendor/jane-php/open-api-3/Generator/EndpointGenerator.php(80): Jane\OpenApi3\Generator\EndpointGenerator->getTransformResponseBody(Object(Jane\OpenApiCommon\Guesser\Guess\OperationGuess), 'BusinessProcess...', Object(Jane\OpenApi3\Guesser\GuessClass), Object(Jane\OpenApiCommon\Generator\ExceptionGenerator), Object(Jane\JsonSchema\Generator\Context\Context))
    #1 /vendor/jane-php/open-api-common/Generator/OperationGenerator.php(38): Jane\OpenApi3\Generator\EndpointGenerator->createEndpointClass(Object(Jane\OpenApiCommon\Guesser\Guess\OperationGuess), Object(Jane\JsonSchema\Generator\Context\Context))
    #2 /vendor/jane-php/open-api-common/Generator/ClientGenerator.php(38): Jane\OpenApiCommon\Generator\OperationGenerator->createOperation('businessProcess...', Object(J in /vendor/jane-php/open-api-3/Generator/Endpoint/GetTransformResponseBodyTrait.php on line 43
    

    How to reproduce
    Installed latest symfony, allowed flex contribs, composer required open-api-runtime, added mentioned PictureparkSwagger.json to the config and ran the generate command

    Possible Solution

    Additional context

    bug 
    opened by ilukac 11
  • NonBodyParameterGenerator::getDefaultAsExpr() support for parameters with schema references.

    NonBodyParameterGenerator::getDefaultAsExpr() support for parameters with schema references.

    When a parameter has a reference for a schema, NonBodyParameterGenerator::getDefaultAsExpr() throws the error:

    Fatal error: Uncaught Error: Call to undefined method Jane\JsonSchemaRuntime\Reference::getDefault()
    

    My temporary fix was:

        /**
         * Generate a default value as an Expr.
         */
        private function getDefaultAsExpr(Parameter $parameter): Expr
        {
            $schema = $parameter->getSchema();
            $default = $schema instanceof Reference ? $schema->resolve()['default'] : $schema->getDefault();
            $expr = $this->parser->parse('<?php ' . var_export($default, true) . ';')[0];
    
            if ($expr instanceof Stmt\Expression) {
                return $expr->expr;
            }
    
            return $expr;
        }
    

    Example OAS3 schema:

    components:
      parameters:
        foo:
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/string_enum_4'
      schemas:
        string_enum_4:
          enum:
            - bar
            - baz
            - qux
            - quux
          type: string
    
    
    bug 
    opened by Jaesin 11
  • Fix generated object normalizer to match the interfaces

    Fix generated object normalizer to match the interfaces

    The generated normalizers does not match the interfaces DenormalizerInterface NormalizerInterface DenormalizerAwareInterface NormalizerAwareInterface

    grafik

    opened by JoshuaBehrens 10
  • do not type hint mixed parameter types for request bodies in endpoint constructor and clients operations method

    do not type hint mixed parameter types for request bodies in endpoint constructor and clients operations method

    see #157

    Resolved parameter types for response bodies of type mixed are used as type hints in endpoint constructor and related client operation method signatures.

    This PR fixes this by using the default parameter type null for these cases.

    opened by lordrhodos 10
  • Add response & default message in generated exceptions

    Add response & default message in generated exceptions

    Fixes #682

    Adds:

    • Default message based on https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/HttpFoundation/Response.php#L149-L212 in exceptions with no descriptions
    • Response as an exception attribute
    opened by Korbeil 1
  • [AutoMapper] Warm-up mappers in AutoMapper bundle

    [AutoMapper] Warm-up mappers in AutoMapper bundle

    Is your feature request related to a problem? Please describe. I would need a way to warm-up mappers when using the AutoMapper bundle

    Describe the solution you'd like Something like this when defining the bundle configuration:

    jane_auto_mapper:
        autoregister: true
        mappings:
            - source: Jane\Bundle\AutoMapper\Tests\Fixtures\User
              target: Jane\Bundle\AutoMapper\Tests\Fixtures\UserDTO
              pass: DummyApp\UserConfigurationPass
        warmup:
            - source: array
              target: Jane\Bundle\AutoMapper\Tests\Fixtures\User
            - source: Jane\Bundle\AutoMapper\Tests\Fixtures\User
              target: Jane\Bundle\AutoMapper\Tests\Fixtures\UserDTO
    
    enhancement 
    opened by Korbeil 0
  • Adding a way to check a model metadata from a CLI perspective into our Symfony Bundle.

    Adding a way to check a model metadata from a CLI perspective into our Symfony Bundle.

    Is your feature request related to a problem? Please describe. Adding a way to check a model metadata from a CLI perspective into our Symfony Bundle.

    Describe the solution you'd like A command in the bundle where I can give a model FQCN and it will output if it sees properties with metadata issues.

    enhancement 
    opened by Korbeil 0
  • Correct processing of oneOf

    Correct processing of oneOf

    Is your feature request related to a problem? Please describe.

    Jane can not process usages of oneOf which often used in OpenAPI schemas

    Describe the solution you'd like

    Right now I do not have fully-scale solution for support of oneOf. Saying full-scale solution I mean at least two aspects:

    • building an object model (classes) against OpenAPI specs
    • converting the data being transferred during the usage of the API via the SDK

    First I'd like to discuss what we want to receive in PHP code when we use oneOf i.e what classes should be built from schemas with oneOf

    First of all I think we must strictly distinguish the contexts of oneOf keywords usage. There can be two options:

    • oneOf applied to the entity which has its own name and therefore can be explicitly converted to some class in object oriented programming languages like PHP
        {
          "Entity": {
            "type": "object",
            "oneOf": [
               ......
            ]
          }
        }
    
    • oneOf applied to properties
        {
          "Entity": {
            "type": "object",
            "properties": {
              "theProperty": {
                "type": "object",
                "oneOf": [
                  .......
                ]
            }
          }
        }
    

    In terms of programming languages which support types, oneOf naturally corresponds with the union types and the best option is - to convert all usages of oneOf into unions. In PHP it’s possible to use syntax of union in argument and property declarations, but it’s not possible to declare custom type as a union of types, so some tricks will be required to process such cases

    OneOf for Entity

    OneOf custom types

    In PHP it’s not possible to declare custom type as a union of types and where possible we can do some tricks replacing union with inheritance

    Schema Example:

    {
        "Entity": {
            "type": "object",
            "title": "Entity which can be TypeOne or TypeTwo",
            "oneOf": [
                {
                    "$ref": "#/components/schemas/TypeOne"
                },
                {
                    "$ref": "#/components/schemas/TypeTwo"
                }
            ]
        },
        "TypeOne": {
            "type": "object",
            "title": "TypeOne",
            "properties": {
                "typeOneProperty": {
                    "type": "string"
                }
            }
        },
        "TypeTwo": {
            "type": "object",
            "title": "TypeTwo",
            "properties": {
                "typeTwoProperty": {
                    "type": "string"
                }
            }
        }
    }
    

    PHP Code:

    class Entity {
        
    }
    
    class TypeOne extends Entity {
    
        /**
         * @var string
         */
        private $typeOneProperty;
    }
    
    class TypeTwo extends Entity {
    
        /**
         * @var string
         */
        private $typeTwoProperty;
    }
    

    OneOf built-in types

    But it’s also not possible to declare that your entity is one of primitive types.

    Schema Example:

         "components": {
            "schemas": {
                "Entity": {
                    "type": "object",
                    "title": "An Entity which can be an integer or a string",
                    "oneOf": [
                        {
                            "type": "integer"
                        },
                        {
                            "type": "string"
                        }
                    ]
                }
            }
        }
    

    PHP Code:

    PHP does not allow declare classes which can be union of several types, we can not declare that some class is a parent for integer and string. I'm afraid no way to process such cases for in PHP-clients

    OneOf for property

    It’s possible to use syntax of union in argument and property declarations

    OneOf built-in types

    Schema Example:

    {
        "Entity": {
            "type": "object",
            "title": "Entity which can be TypeOne or TypeTwo",
            "properties": {
                "theProperty": {
                    "type": "object",
                    "oneOf": [
                        {
                            "type": "integer"
                        },
                        {
                            "type": "string"
                        }
                    ]
                }
            }
        }
    }
    

    PHP Code:

    class Entity {
        /**
         \* @var int|string 
         */
        private $theProperty;
    
        /**
         * @return int|string
         */
        public function getTheProperty()
        {
            return $this->theProperty;
        }
    
        /**
         * @param int|string $theProperty
         */
        public function setTheProperty($theProperty): void
        {
            $this->theProperty = $theProperty;
        }
    }
    

    OneOf custom types

    Schema Example:

    {
        "Entity": {
            "type": "object",
            "title": "Entity which can be TypeOne or TypeTwo",
            "properties": {
                "theProperty": {
                    "type": "object",
                    "oneOf": [
                        {
                            "$ref": "#/components/schemas/TypeOne"
                        },
                        {
                            "$ref": "#/components/schemas/TypeTwo"
                        }
                    ]
                }
            }
        },
        "TypeOne": {
            "type": "object",
            "title": "TypeOne",
            "properties": {
                "typeOneProperty": {
                    "type": "string"
                }
            }
        },
        "TypeTwo": {
            "type": "object",
            "title": "TypeTwo",
            "properties": {
                "typeTwoProperty": {
                    "type": "string"
                }
            }
        }
    }
    

    PHP Code:

    class Entity {
        /**
         * @var TypeOne|TypeTwo 
         */
        private $theProperty;
    
        /**
         * @return TypeOne|TypeTwo
         */
        public function getTheProperty()
        {
            return $this->theProperty;
        }
    
        /**
         * @param TypeOne|TypeTwo $theProperty
         */
        public function setTheProperty($theProperty): void
        {
            $this->theProperty = $theProperty;
        }
    }
    
    class TypeOne {
    
        /**
         * @var string
         */
        private $typeOneProperty;
    }
    
    class TypeTwo {
    
        /**
         * @var string
         */
        private $typeTwoProperty;
    }
    

    Conclusion

    If we agree about expected result in terms of PHP classes, I could continue working on how this conversion can be achieved in terms of serialization. Looking forward for your reply. Cheers

    enhancement 
    opened by murat11 2
  • Impossible to read response body for a failed request

    Impossible to read response body for a failed request

    Jane version(s) affected: 7.4.0

    Description
    Exceptions do not contain server response body thus not allowing to understand what exactly went wrong during the request.

    E.g. we're trying to create some resource, but server-side validation of some field failed and the server returned a 422 response. Jane would throw an UnprocessableEntityException that we can catch in our client code, but we can't show the user what exactly went wrong because we don't have access to the response body, containing that information.

    I'm not sure whether something's wrong with my OpenAPI specification, but exception classes that are generated by Jane only contain the Unprocessable entity message and nothing else.

    How to reproduce

    1. Send POST /collection with payload that would cause 422 error.
    2. Catch UnprocessableEntityException.
    3. Try to render human-readable error message with details of which particular field is invalid and why.

    Possible Solution
    I believe exceptions must contain a response body with error details at least in raw format in case there's no easy way to standardize it.

    bug 
    opened by Kolyunya 5
  • tests(openapi): simple object should not generate object

    tests(openapi): simple object should not generate object

    Hello,

    here is a failing test case for a problem which occurs in jane-php/open-api-3 version 7.4.0. Problem was not present in 7.3.1

    given this deifnition

        "components": {
            "schemas": {
                "Foo": {
                    "properties": {
                        "bar": {
                            "$ref": "#\/components\/schemas\/Bar"
                        }
                    },
                    "type": "object"
                },
                "Bar": {
                    "type": "object"
                }
            }
        }
    

    I expect the type of property Foo:$bar to be mixed, and not mixed[]

    WDYT?

    opened by nikophil 2
Releases(v7.4.0)
  • v7.4.0(Nov 15, 2022)

    Added

    • [OpenAPI] GH#665 Support API Platform and different response content types; application/ld+json application/hal+json application/vnd.api+json, through optional accept headers in Client methods.
    • [OpenAPI] GH#656 Support anyOf reference or null property in schema
    • [JsonSchema] GH#674 Skip normalization when property isn't set and not required in a Model

    Changed

    • [OpenAPI] GH#647 Support inheritance using discriminator with mapping
    • [JsonSchema] GH#640 GH#651 Rework Validation
    • [OpenAPI] GH#667 Update OpenApi3 schema model

    Fixed

    • [OpenAPI] GH#636 Fixing issue with http_query_build and QS array variables
    • [OpenAPI] GH#660 Fix non-guessed OpenApiCommon validators
    • [OpenAPI] GH#664 Fix Namespace missmatch on SubModel validation
    • [JsonSchema] GH#668 Validation - Guess SubModel only on classes, not on properties
    • [OpenAPI] GH#670 Missing models when using whitelisted-paths
    • [OpenAPI] GH#672 Unwanted models when using whitelisted-paths
    Source code(tar.gz)
    Source code(zip)
  • v7.3.1(Aug 22, 2022)

    Changed

    • [JsonSchema] GH#643 Correctly handle floats that look like integer
    • [JsonSchema] GH#644 Since symfony 5, constraint Length with min option allows empty string
    • [JsonSchema] GH#639 Report the actual validation errors when logging validation error

    Fixed

    • [JsonSchema] GH#645 Fix nullable incompatibility between JsonSchema/OpenAPI versions
    Source code(tar.gz)
    Source code(zip)
  • v7.3.0(Aug 3, 2022)

    Added

    • [JsonSchema] GH#632 Validation - Check for nullable field values
    • [OpenApi] GH#634 Make a new method to get an endpoint raw response

    Deprecated

    • [OpenApi] GH#634 Using Client::executeEndpoint method with $fetch parameter equals to response is deprecated, use Client::executeRawEndpoint instead.

    Removed

    • [OpenApi] GH#635 Remove symfony/translation-contracts dependency

    Fixed

    • [JsonSchema] GH#629 Handle validation when fields has no validation guess
    • [OpenApi] GH#633 Remove null from endpoint @return statement if unexpected status code is to be thrown.
    Source code(tar.gz)
    Source code(zip)
  • v7.2.5(Jul 1, 2022)

  • v7.2.4(Jun 15, 2022)

  • v7.2.3(Jun 15, 2022)

  • v7.2.2(Mar 21, 2022)

  • v7.2.1(Mar 5, 2022)

  • v7.2.0(Feb 17, 2022)

  • v7.1.7(Feb 3, 2022)

    Added

    • [OpenApi3] GH#586 Ability to customize strings field normalization/denormalization based on format keyword

    Fixed

    • [JsonSchema] GH#587 Prefix property starting with number with 'n'
    • [OpenApi] GH#593 Add type hints to exceptions, cleanup parent constructor call
    • [OpenApi3] GH#592 Fix issue in whitelisting when having referenced schema in referenced responses
    • [AutoMapper] GH#594 Issue when no targetTypes in BuiltinTransformer
    Source code(tar.gz)
    Source code(zip)
  • v7.1.6(Jan 27, 2022)

  • v7.1.5(Dec 16, 2021)

  • v7.1.4(Dec 16, 2021)

  • v7.1.3(Nov 12, 2021)

  • v7.1.2(Oct 18, 2021)

  • v7.1.1(Oct 8, 2021)

  • v6.3.9(Oct 8, 2021)

  • v7.1.0(Jun 25, 2021)

  • v7.0.0(May 19, 2021)

    Added

    • [AutoMapper] GH#462 Move bundle out of the component
    • [AutoMapper] GH#433 Handle dictionaries with ArrayTransformer
    • [AutoMapper] GH#432 Ignore API Platform resources when using AutoMapper normalizer
    • [AutoMapper] GH#495 Add Symfony Uid transformers #495
    • [AutoMapper] GH#507 Add skip_null_values feature

    Changed

    • [Jane] GH#464 Update version deps for 7-dev
    • [Jane] GH#457 BC-BREAK Move components into component folder and update namespaces
    • [AutoMapper] GH#458 Add PrioritizedTransformerFactoryInterface and implementation
    • [AutoMapper] GH#459 Add DependentTransformerInterface and implementation
    • [AutoMapper] GH#460 Add AssignedByReferenceTransformerInterface and implementation

    Fixed

    • [AutoMapper] GH#461 Transformer arguments typo
    • [AutoMapper] GH#487 Can not call getName when type is adders/removers
    Source code(tar.gz)
    Source code(zip)
  • v6.3.8(May 10, 2021)

  • v6.3.7(Mar 26, 2021)

  • v6.3.6(Mar 16, 2021)

  • v6.3.5(Mar 12, 2021)

  • v6.3.4(Mar 11, 2021)

  • v6.3.3(Feb 10, 2021)

    Added

    • [OpenAPI] GH#500 Bring ability skip query / header check

    Changed

    • [AutoMapper] GH#498 Improve FileLoader: do not use registry at all when hot reload is disabled.
    • [AutoMapper] GH#498 When using bundle: automatically disable hot reload when not in debug mode.

    Fixed

    • [OpenAPI] GH#497 Fixing a whitelisted paths notation in OpenAPI 2 and 3 guessers
    Source code(tar.gz)
    Source code(zip)
  • v6.3.2(Dec 23, 2020)

    Changed

    • [AutoMapper] GH#465 Allow dateTimeFormat customisation when initialising
    • [Jane] GH#483 PHP 8 support

    Fixed

    • [OpenAPI] GH#472 Check if contentType is null before passing to mb_strpos
    • [OpenAPI] GH#480 Allow null for non required request body
    • [OpenAPI] GH#482 Fix ExceptionGenerator
    • [OpenAPI] GH#484 Handle multipart body integer as string

    Documentation

    • [OpenAPI] GH#477 Fixed typo about usage with Symfony recipe
    Source code(tar.gz)
    Source code(zip)
  • v6.3.1(Nov 24, 2020)

  • v6.3.0(Nov 22, 2020)

    Added

    • [AutoMapper] GH#443 Add configuration to use custom NameConverter
    • [AutoMapper] GH#446 Add autoconfigure on TransformerFactoryInterface
    • [AutoMapper] GH#453 Introducing autoregistering of custom Mapper configuration

    Changed

    • [AutoMapper] GH#431 Add a second parameter to forMember with target object
    • [AutoMapper] GH#452 Improve ClassLoaderInterface service definition
    Source code(tar.gz)
    Source code(zip)
  • v6.2.5(Nov 18, 2020)

    Fixed

    • [AutoMapper] GH#426 Fix mapping for empty collection value on an array property
    • [OpenAPI] GH#444 Remove unused files
    • [OpenAPI] GH#447 Fix errors caused by empty responses in OpenAPI specs

    Documentation

    • [OpenAPI] GH#438 Fix documentation namespaces for consistency
    Source code(tar.gz)
    Source code(zip)
  • v6.2.4(Oct 2, 2020)

Owner
Jane
:seedling: Jane is a set of libraries to generate Models & API Clients based on JSON Schema / OpenAPI specs
Jane
Generates OpenApi specification for Laravel, Lumen or Dingo using a configuration array and cebe/php-openapi

OpenApi Generator for Laravel, Lumen and Dingo. About The openapi-gen package provides a convenient way to create OpenApi specifications for Laravel,

Jean Dormehl 5 Jan 25, 2022
Extended response classes for Rest API clients/SDKs

Rest Response Extended response classes for Rest API clients/SDKs. About This package is intended to be component of SDKs so the responses can be easi

Ilesanmi Olawale Adedotun 2 Mar 28, 2022
Read and write OpenAPI 3.0.x YAML and JSON files and make the content accessible in PHP objects.

php-openapi Read and write OpenAPI 3.0.x YAML and JSON files and make the content accessible in PHP objects. It also provides a CLI tool for validatin

Carsten Brandt 399 Dec 23, 2022
It validates PSR-7 messages (HTTP request/response) against OpenAPI specifications

OpenAPI PSR-7 Message (HTTP Request/Response) Validator This package can validate PSR-7 messages against OpenAPI (3.0.x) specifications expressed in Y

The League of Extraordinary Packages 421 Jan 3, 2023
Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using laravel best practices.

Laravel API tool kit and best API practices Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using lar

Ahmed Esa 106 Nov 22, 2022
Laravel library to convert your models into API responses.

Laravel Scene Laravel library to convert your models into API responses. Why a transformation library? By default you can use the default implementati

Ahmed Azaan 27 Nov 23, 2022
Ariama Victor (A.K.A. OVAC4U) 106 Dec 25, 2022
Awesome Set of Packages for Laravel

Awesome Set of Packages for Laravel The set provides best practices to make development more fun and classes/services that I found very useful while w

Aleksei Lebedev 8 Nov 24, 2022
🍞🧑‍🍳 An on-the-fly GraphQL Schema generator from Eloquent models for Laravel.

An on-the-fly GraphQL Schema generator from Eloquent models for Laravel. Installation Quickstart Model schemas Installation This package requires PHP

Scrn 100 Oct 16, 2022
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Luracast Restler ![Gitter](https://badges.gitter.im/Join Chat.svg) Version 3.0 Release Candidate 5 Restler is a simple and effective multi-format Web

Luracast 1.4k Dec 14, 2022
The maker bundle allows you to generate content elements, front end modules

Contao 4 maker bundle The maker bundle allows you to generate content elements, front end modules, event listener, callbacks and hooks using interacti

Contao 7 Aug 3, 2022
The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs

NelmioApiDocBundle The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs. Migrate from 3.x to 4.0 To migrate from

Nelmio 2.1k Jan 6, 2023
Php API based in clean architecture

Clean Arch API 1.1 Run docker-compose command: $ docker-compose up -d 1.2 Install dependencies: $ docker exec -it clean-arch-api composer install 1.3

Pedro Amaral 6 Sep 27, 2021
This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science courses and the like.

Simple PHP API v.1.0 This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science courses a

Edson M. de Souza 14 Nov 18, 2021
微信支付 API v3 的 PHP Library,同时也支持 API v2

微信支付 WeChatPay OpenAPI SDK [A]Sync Chainable WeChatPay v2&v3's OpenAPI SDK for PHP 概览 微信支付 APIv2&APIv3 的Guzzle HttpClient封装组合, APIv2已内置请求数据签名及XML转换器,应

null 275 Jan 5, 2023
This API provides functionality for creating and maintaining users to control a simple To-Do-List application. The following shows the API structure for users and tasks resources.

PHP API TO-DO-LIST v.2.0 This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science cours

Edson M. de Souza 6 Oct 13, 2022
API documentation API SCB EASY APP

SCB-API-EASY V3.0 API documentation SIAM COMMERCIAL BANK PUBLIC COMPANY LTD. API SCB Easy V3 endpoint = https://fasteasy.scbeasy.link 1.0. Get balance

SCB API Esay team 2 Sep 28, 2021
Courier API adalah project API untuk mengetahui ongkos kirim Logistik-logistik pengiriman barang antar kota & International

Courier API Courier API adalah project API untuk mengetahui ongkos kirim Logistik-logistik pengiriman barang antar kota (dalam negeri) & International

Rangga Darmajati 2 Sep 24, 2021
LaraBooks API - Simple API for iOS SwiftUI app tests.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Konrad Podrygalski 1 Nov 13, 2021