src/Factory/SwaggerFactory.php
public function serialize(Swagger $swagger)
    {
        $context = new SerializationContext();

        $context->setVersion(
            $swagger->getVersion()
        );

        return $this->serializer->serialize($swagger, 'json', $context);
    }
public function serialize(Swagger $swagger)
    {
        $context = new SerializationContext();

        $context->setVersion(
            $swagger->getVersion()
        );

        return $this->serializer->serialize($swagger, 'json', $context);
    }
public function serialize ( Swagger $ swagger ) { $ context = new SerializationContext ( ) ; $ context -> setVersion ( $ swagger -> getVersion ( ) ) ; return $ this -> serializer -> serialize ( $ swagger , 'json' , $ context ) ; }
Return serialized Swagger document

@param Swagger $swagger
@return string
Return serialized Swagger document