Skip to content

How to add the response header to only one endpoint #261

Closed Answered by chullybun
Kazunari001 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Kazunari001, your thinking above is on the right track. Beef is/was never intended to be an all-in proposition, but a means to industrialize the most common patterns. Therefore, the Controller class is made partial to enable you as the developer to extend capabilities where the Beef out-of-the-box is not appropriate.

Depending on your needs, you may still want the other layers code-generated with your custom Controller logic invoking. If this is the case, then add excludeWebApi: true to the operation code-gen configuration. FYI: there is documentation for all of the possible code-gen configurations; see here.

Finally, this is a bit more hacky but is another means to achieve your goal.…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Kazunari001
Comment options

Answer selected by Kazunari001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants