You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we now have a way to explicitly define HttpParts (#3046), I think it would be beneficial to introduce a linter rule that warns users when relying on implicit parts. This would encourage clearer and more maintainable specs by making HttpParts usage explicit.
Additionally, a multipart operation must have a @bodyProperty property. Operations that use spread models or are structured like this:
are not resolved as multipart in @typespec/http, as discussed in #4041.
Given this behavior, I believe it's important to add a linter rule to help users successfully define multipart operations. This would prevent unexpected behavior and ensure specs are correctly structured.
Clear and concise description of the problem
Since we now have a way to explicitly define
HttpParts
(#3046), I think it would be beneficial to introduce a linter rule that warns users when relying on implicit parts. This would encourage clearer and more maintainable specs by makingHttpParts
usage explicit.Additionally, a multipart operation must have a
@bodyProperty
property. Operations that use spread models or are structured like this:are not resolved as multipart in
@typespec/http
, as discussed in #4041.Given this behavior, I believe it's important to add a linter rule to help users successfully define multipart operations. This would prevent unexpected behavior and ensure specs are correctly structured.
cc: @timotheeguerin
Checklist
The text was updated successfully, but these errors were encountered: