Skip to content

Conversation

@asiirtol
Copy link

Fix issue #65

// We don't want the Authorization header listed as Parameter. This should be done in ENDPOINT_INFO() { info->addSecurityRequirement( /* SecurityScheme-Name */ ); }
if (header != oatpp::web::protocol::http::Header::AUTHORIZATION) {
filteredHeaders[header] = info->headers[header];
filteredHeaders.add(header, info->headers[header].type) = info->headers[header];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @asiirtol ,

I believe that it's better to fix it here:

The [] operator should check - if it's a new element - then add to m_order

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that modifying operator[] would be a more elegant solution but operator[] only takes a name as a parameter. In order to add a new element it should know the type of the element, too. How operator[] could do that?

@ns-wxin
Copy link

ns-wxin commented May 20, 2024

@asiirtol and @lganzzzo , do you plan to support header annotation in any release coming out soon? If we don't have a perfect solution yet, would this fix be good enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants