xsd2php convert:jms-yaml - seems to create incorrectly formatted yml filename
Closed this issue · 3 comments
I'm hoping that I've just missed something obvious, but when I create yaml using;
xsd2php convert:jms-yaml xsd --ns-map='http://example.com/namespace;Vendor/Project/Model/Namespace/' --ns-dest='Vendor/Project/Model/Namespace/';src/Metadata/Namespace'"
It creates the Yaml with the filename;
src/Metadata/Namespace/Thing.yml
when I think it should create (according to http://jmsyst.com/libs/serializer/master/configuration);
src/Metadata/Namespace/Vendor.Project.Model.Namespace.Thing.yml
Playing with Goetas\Xsd\XsdToPhp\Jms\PathGenerator\Psr4PathGenerator so that;
$f = strtr(substr($ns, strlen($namespace)), "/", "..");
becomes
$f = strtr($ns, "/", "..");
Seems to work for me and the SerializerBuilder seems to work for me.
The path should be correct... it depends how you configure the serializer builder
$serializerBuilder->addMetadataDir('metadata dir', 'DemoNs');
How is configured you serializer builder?
Thanks, that's got it. I knew it was probably me doing something stupid. I hadn't passed the $namespacePrefix.