Skip to content

Commit

Permalink
Refined rule documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
xJREB committed Feb 10, 2024
1 parent 183e75c commit e737be9
Show file tree
Hide file tree
Showing 4 changed files with 3,341 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ Description from Massé [1].
## Source

[1] https://www.oreilly.com/library/view/rest-api-design/9781449317904/
[2] https://restapilinks.com/controller/#:~:text=Like%20a%20traditional%20web%20application%27s,%2C%20also%20known%20as%20CRUD).&text=A%20controller%20resource%20name%20is%20a%20verb%20instead%20of%20a%20noun.
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ The Path is divided into the individual segments. Then, to check if a segment en

## Source

[1] https://www.oreilly.com/library/view/rest-api-design/9781449317904/
[2] https://en.wikipedia.org/wiki/List_of_filename_extensions
- [1] https://www.oreilly.com/library/view/rest-api-design/9781449317904/
- [2] https://en.wikipedia.org/wiki/List_of_filename_extensions
12 changes: 6 additions & 6 deletions docs/rules/implemented-rules/Request-Methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ Description from Massé [1].

### What is checked:

* For each request based on the description or the summary we check if the description or summary meaning correspond to request type
* In order to make this assumption we use weka and a model we trained to predict the request type
* If the request type doesn't match with the given request type, throw a violation
* For each request, we check if the description or summary attribute corresponds to the request type.
* To implement this, we used Weka [2] to train a Naive Bayes Multinomial classifier (`models/request_model.dat`) that predicts the request type based on the description or the summary. We curated a dataset of over 3k instances for this (`models/request-model-training-data.txt`).
* If the prediction doesn't match with the given request type, we throw a violation.

### What is not checked:

* If the percentage of the predicted value is bellow 75% then we don't consider the prediction as reliable
* If the percentage of the predicted value is below 75%, then we don't consider the prediction as reliable.

### Future work

* --

## Source

[1] https://www.oreilly.com/library/view/rest-api-design/9781449317904/
[2] https://www.cs.waikato.ac.nz/ml/weka/
- [1] https://www.oreilly.com/library/view/rest-api-design/9781449317904/
- [2] https://www.cs.waikato.ac.nz/ml/weka/
Loading

0 comments on commit e737be9

Please sign in to comment.