How use requirements for variable in symfony routeset parameter to be required in symfony2 routingissue with subdomain routing in symfony 2.3.2Symfony2 impersonation route parameters missingHow to pass a variable to routing defaults in Symfony?Hide Global Locale in a route in symfony 2How to manage prefix in Symfony (3.0) with bundle KnpMenusymfony url redirect : Some mandatory parameters are missingHow to make a Symfony GET form redirect to route with parameter?Symfony - Api Platform - How to automatically add the authorized user as a resource ownerSymfony routing name through yaml

Time difference between banns and marriage

Did anybody find out it was Anakin who blew up the command center?

What is Soda Fountain Etiquette?

Notice period 60 days but I need to join in 45 days

Units in general relativity

Is it true that different variants of the same model aircraft don't require pilot retraining?

Find most "academic" implementation of doubly linked list

If I said I had $100 when asked, but I actually had $200, would I be lying by omission?

Why is there not a willingness from the world to step in between Pakistan and India?

Does trying to charm an uncharmable creature cost a spell slot?

Can MuseScore be used programmatically?

What are the IPSE’s, the ASPE’s, the FRIPSE’s and the GRIPSE’s?

Can a DM change an item given by another DM?

Talk interpreter

74S vs 74LS ICs

Why did Lucius make a deal out of Buckbeak hurting Draco but not about Draco being turned into a ferret?

Given current technology, could TV display screens double as video camera sensors?

How do solar inverter systems easily add AC power sources together?

Did ancient peoples ever hide their treasure behind puzzles?

Why does a sticker slowly peel off, but if it is pulled quickly it tears?

What is the name of this plot that has rows with two connected dots?

Should an STL container avoid copying elements into themselves when the container is copied into itself?

Why did James Cameron decide to give Alita big eyes?

Will removing shelving screws from studs damage the studs?



How use requirements for variable in symfony route


set parameter to be required in symfony2 routingissue with subdomain routing in symfony 2.3.2Symfony2 impersonation route parameters missingHow to pass a variable to routing defaults in Symfony?Hide Global Locale in a route in symfony 2How to manage prefix in Symfony (3.0) with bundle KnpMenusymfony url redirect : Some mandatory parameters are missingHow to make a Symfony GET form redirect to route with parameter?Symfony - Api Platform - How to automatically add the authorized user as a resource ownerSymfony routing name through yaml






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I need to add a requirement for my api route (only allow 3 mgn , user and adm) but i get the error:



MissingMandatoryParametersException



Some mandatory parameters are missing ("role") to generate a URL for route "api_doc".



here is my route:



api_platform:
resource: .
type: api_platform
prefix: /role/api
requirements:
role: "mng|adm|user"



should i install or set something?, thank you










share|improve this question



















  • 1





    Please provide more details. What is the full stack trace? What does the code producing the error look like?

    – dbrumann
    Mar 27 at 21:03






  • 1





    You're trying to change the base url of your api with a dynamic variable, so when API Platform tries to generate a route, it's missing the role variable and fails. I'm not sure what would be right way to handle this but maybe you could explain why you need to have a role variable in the URL?

    – thomas.drbg
    Mar 28 at 8:15

















0















I need to add a requirement for my api route (only allow 3 mgn , user and adm) but i get the error:



MissingMandatoryParametersException



Some mandatory parameters are missing ("role") to generate a URL for route "api_doc".



here is my route:



api_platform:
resource: .
type: api_platform
prefix: /role/api
requirements:
role: "mng|adm|user"



should i install or set something?, thank you










share|improve this question



















  • 1





    Please provide more details. What is the full stack trace? What does the code producing the error look like?

    – dbrumann
    Mar 27 at 21:03






  • 1





    You're trying to change the base url of your api with a dynamic variable, so when API Platform tries to generate a route, it's missing the role variable and fails. I'm not sure what would be right way to handle this but maybe you could explain why you need to have a role variable in the URL?

    – thomas.drbg
    Mar 28 at 8:15













0












0








0








I need to add a requirement for my api route (only allow 3 mgn , user and adm) but i get the error:



MissingMandatoryParametersException



Some mandatory parameters are missing ("role") to generate a URL for route "api_doc".



here is my route:



api_platform:
resource: .
type: api_platform
prefix: /role/api
requirements:
role: "mng|adm|user"



should i install or set something?, thank you










share|improve this question














I need to add a requirement for my api route (only allow 3 mgn , user and adm) but i get the error:



MissingMandatoryParametersException



Some mandatory parameters are missing ("role") to generate a URL for route "api_doc".



here is my route:



api_platform:
resource: .
type: api_platform
prefix: /role/api
requirements:
role: "mng|adm|user"



should i install or set something?, thank you







symfony api-platform.com






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 at 20:24









YeisonMYeisonM

175 bronze badges




175 bronze badges










  • 1





    Please provide more details. What is the full stack trace? What does the code producing the error look like?

    – dbrumann
    Mar 27 at 21:03






  • 1





    You're trying to change the base url of your api with a dynamic variable, so when API Platform tries to generate a route, it's missing the role variable and fails. I'm not sure what would be right way to handle this but maybe you could explain why you need to have a role variable in the URL?

    – thomas.drbg
    Mar 28 at 8:15












  • 1





    Please provide more details. What is the full stack trace? What does the code producing the error look like?

    – dbrumann
    Mar 27 at 21:03






  • 1





    You're trying to change the base url of your api with a dynamic variable, so when API Platform tries to generate a route, it's missing the role variable and fails. I'm not sure what would be right way to handle this but maybe you could explain why you need to have a role variable in the URL?

    – thomas.drbg
    Mar 28 at 8:15







1




1





Please provide more details. What is the full stack trace? What does the code producing the error look like?

– dbrumann
Mar 27 at 21:03





Please provide more details. What is the full stack trace? What does the code producing the error look like?

– dbrumann
Mar 27 at 21:03




1




1





You're trying to change the base url of your api with a dynamic variable, so when API Platform tries to generate a route, it's missing the role variable and fails. I'm not sure what would be right way to handle this but maybe you could explain why you need to have a role variable in the URL?

– thomas.drbg
Mar 28 at 8:15





You're trying to change the base url of your api with a dynamic variable, so when API Platform tries to generate a route, it's missing the role variable and fails. I'm not sure what would be right way to handle this but maybe you could explain why you need to have a role variable in the URL?

– thomas.drbg
Mar 28 at 8:15












1 Answer
1






active

oldest

votes


















0















already find a solution
if some person need it



api_platform:
resource: .
type: api_platform
prefix: /app/api
defaults:
app: take|mngr|drvr
requirements:
app: take|mngr|drvr



thank you






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385858%2fhow-use-requirements-for-variable-in-symfony-route%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0















    already find a solution
    if some person need it



    api_platform:
    resource: .
    type: api_platform
    prefix: /app/api
    defaults:
    app: take|mngr|drvr
    requirements:
    app: take|mngr|drvr



    thank you






    share|improve this answer





























      0















      already find a solution
      if some person need it



      api_platform:
      resource: .
      type: api_platform
      prefix: /app/api
      defaults:
      app: take|mngr|drvr
      requirements:
      app: take|mngr|drvr



      thank you






      share|improve this answer



























        0














        0










        0









        already find a solution
        if some person need it



        api_platform:
        resource: .
        type: api_platform
        prefix: /app/api
        defaults:
        app: take|mngr|drvr
        requirements:
        app: take|mngr|drvr



        thank you






        share|improve this answer













        already find a solution
        if some person need it



        api_platform:
        resource: .
        type: api_platform
        prefix: /app/api
        defaults:
        app: take|mngr|drvr
        requirements:
        app: take|mngr|drvr



        thank you







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 18:16









        YeisonMYeisonM

        175 bronze badges




        175 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385858%2fhow-use-requirements-for-variable-in-symfony-route%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript