在我的项目中,有一些编码需要遵循Web Api。 有没有什么办法可以在Resharper中配置这些指令?我正在使用Resharper旗舰版。我们也可以这样配置resharper,如果这些指令没有遵循,那么它会抛出一个错误并显示建议。使用Resharper实现编码指南
该准则包含像普通的指令:
Use Camel case in Payload
Use camel case for the data elements in the payload. Eg:firstName,lastName
Use lowercase in Endpoints
Use only lower case when defining the endpoints.
Eg: GET \api\v1\customers\{CustomerID}\rewards
Use hyphen for compound words in Endpoints
Use hyphen for compound words in Endpoints.
Eg: GET \api\v1\customers\{CustomerId}\order-history
Use Nouns not verbs
Noun based endpoint should be used rather than verb based endpoint for CRUD operations.
Eg: GET \api\v1\\customers, GET \api\v1\customers\{CustomerID}
GET \api\v1\GetAllCustomers
Use verb followed by noun in case of certain functions.
Eg: PUT \api\v1\customers\{CustomerID}\send-email
谢谢大家的快速回复。但我需要更多的定制。 例如如果有人将端点定义为captial case letter [Route(“Seller/Search/{Page}/{PageSize}”)],那么它应该抛出错误并建议将[i]作为[Route(“seller/search/{page}/{ pageSize}“)] – SKiran