mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
fixed README, other minor things
This commit is contained in:
parent
034e13a20e
commit
1cf7e18d61
@ -14,12 +14,8 @@ class RegisterJmsParserPass implements CompilerPassInterface
|
|||||||
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||||
|
|
||||||
//JMS may or may not be installed, if it is, load that config as well
|
//JMS may or may not be installed, if it is, load that config as well
|
||||||
try {
|
if ($container->hasDefinition('jms_serializer.serializer')) {
|
||||||
if ($serializer = $container->findDefinition('serializer')) {
|
$loader->load('services.jms.xml');
|
||||||
$loader->load('services.jms.xml');
|
|
||||||
}
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ class JmsMetadataParser implements ParserInterface
|
|||||||
{
|
{
|
||||||
$meta = $this->factory->getMetadataForClass($input);
|
$meta = $this->factory->getMetadataForClass($input);
|
||||||
|
|
||||||
if (is_null($meta)) {
|
if (null === $meta) {
|
||||||
throw new \InvalidArgumentException(sprintf("No metadata found for class %s", $input));
|
throw new \InvalidArgumentException(sprintf("No metadata found for class %s", $input));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +78,7 @@ class JmsMetadataParser implements ParserInterface
|
|||||||
|
|
||||||
//TODO: regex comment to get description - or move doc comment parsing functionality from `ApiDocExtractor` to a new location
|
//TODO: regex comment to get description - or move doc comment parsing functionality from `ApiDocExtractor` to a new location
|
||||||
//in order to reuse it here
|
//in order to reuse it here
|
||||||
|
|
||||||
return $description;
|
return $description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,8 +99,8 @@ The following properties are available:
|
|||||||
|
|
||||||
* `filters`: an array of filters;
|
* `filters`: an array of filters;
|
||||||
|
|
||||||
* `input`: the input type associated to the method, currently this Form Types, and classes with JMS Serializer metadata, useful for POST|PUT methods, either as FQCN or
|
* `input`: the input type associated to the method, currently this supports Form Types, and classes with JMS Serializer
|
||||||
as form type (if it is registered in the form factory in the container)
|
metadata, useful for POST|PUT methods, either as FQCN or as form type (if it is registered in the form factory in the container)
|
||||||
|
|
||||||
Each _filter_ has to define a `name` parameter, but other parameters are free. Filters are often optional
|
Each _filter_ has to define a `name` parameter, but other parameters are free. Filters are often optional
|
||||||
parameters, and you can document them as you want, but keep in mind to be consistent for the whole documentation.
|
parameters, and you can document them as you want, but keep in mind to be consistent for the whole documentation.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user