Skip to content

Added noRequestBody function to check that HTTP GET and DELETE methods do not contain a requestBody#588

Merged
daveshanley merged 7 commits intodaveshanley:mainfrom
lobocv:no-request-body-oas-func
Jan 2, 2025
Merged

Added noRequestBody function to check that HTTP GET and DELETE methods do not contain a requestBody#588
daveshanley merged 7 commits intodaveshanley:mainfrom
lobocv:no-request-body-oas-func

Conversation

@lobocv
Copy link
Copy Markdown

@lobocv lobocv commented Nov 25, 2024

Requested from here: #582

Formats: model.OAS3AllFormat,
Description: "HTTP GET and DELETE should not accept request bodies",
Given: "$",
Resolved: false,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@daveshanley I don't know what Resolved means. Should it be true or false here?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Resolved means that the $ref values have all been stitched together by the resolver in libopenapi

This is used for rules that assume everything is resolved and inlined. It only makes a difference if the logic in your rule / function is recursive - if so, it means that any circular references could create an infinite loop.

@lobocv
Copy link
Copy Markdown
Author

lobocv commented Dec 13, 2024

@daveshanley bump :)

@daveshanley
Copy link
Copy Markdown
Owner

@daveshanley bump :)

Will get to this ASAP, apologies for my slowness.

Copy link
Copy Markdown
Owner

@daveshanley daveshanley left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread functions/openapi/no_request_body.go Outdated
@daveshanley daveshanley merged commit 8749aed into daveshanley:main Jan 2, 2025
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