Daniel Metzner 3b15bb8a4e
[PHP] Enhance Symfony generator (#12532)
* Enhance Symfony generator

  - Add missing typehints
  - Add missing use statements
  - Simplify model ctor
  - Change fallthrough Exception to Throwable
  - prevent storing result of void methods
  - fix validate method
  - add default null values to model properties
  - simplify API interface return values
  - fix/rework default value implementation
  - fix optional params deprecation warnings
  - ..

For more details check out the PR: https://github.com/OpenAPITools/openapi-generator/pull/12532

* Enhance Symfony generator Tests

  - Skip risky tests
  - Fix type hint error
  - Fix class exists tests
  - Fix broken doc block
  - Enhance annotations
  - Update phpunit.xml.dist
  - Fix test config resource location
2022-06-25 20:53:21 +08:00

28 lines
601 B
PHP

<?php
namespace OpenAPI\Server\Service;
interface SerializerInterface
{
/**
* Serializes the given data to the specified output format.
*
* @param object|array|scalar $data
* @param string $format
*
* @return string
*/
public function serialize($data, string $format): string;
/**
* Deserializes the given data to the specified type.
*
* @param mixed $data
* @param string $type
* @param string $format
*
* @return object|array|scalar
*/
public function deserialize($data, string $type, string $format);
}