Nelmioapidocbundle: Set version dynamically

Created on 4 Dec 2019  路  3Comments  路  Source: nelmio/NelmioApiDocBundle

I like to set the version of nelmio dynamically like below

nelmio_api_doc:
documentation:
info:
title: API
description: API Documentation
version: "@=container.hasParameter('some_param') ? parameter('some_param') : 'default_value'"

But it doesn't output the version , instead prints it as a string. Please help

Most helpful comment

You could do that by creating a describer and setting the version field in it (see https://github.com/nelmio/NelmioApiDocBundle/blob/master/Describer/DefaultDescriber.php for an example)

Thanks GuilhemN)))
It helped me)

All 3 comments

You could do that by creating a describer and setting the version field in it (see https://github.com/nelmio/NelmioApiDocBundle/blob/master/Describer/DefaultDescriber.php for an example)

You could do that by creating a describer and setting the version field in it (see https://github.com/nelmio/NelmioApiDocBundle/blob/master/Describer/DefaultDescriber.php for an example)

Thanks GuilhemN)))
It helped me)

I'm closing this then :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abidichrak picture abidichrak  路  5Comments

DavidGarciaCat picture DavidGarciaCat  路  4Comments

kojidev picture kojidev  路  6Comments

manseuk picture manseuk  路  6Comments

GuilhemN picture GuilhemN  路  6Comments