Additional Endpoint Documentation#41
Conversation
0ecc1ef to
a48baac
Compare
1fae88b to
f6ac2cf
Compare
|
@schweikart I've fixed pretty much everything you asked for, some points might need some discussion. The tests are still failing because #44 needs to be merged in this first to fix the usage of the type in SubRoutineDefinition |
schweikart
left a comment
There was a problem hiding this comment.
Most things work nicely now but I have a few more suggestions and comments
|
Our request examples always show {
"requestContent": "namespace Sandwich\n\nfeatures\n Sandwich {extended__}\n mandatory\n Bread\n alternative\n \"Full Grain\" {Calories 203, Price 1.99, Organic true}\n Flatbread {Calories 90, Price 0.79, Organic true}\n Toast {Calories 250, Price 0.99, Organic false}\n optional\n Cheese\n optional\n Gouda\n alternative\n Sprinkled {Fat {value 35, unit \"g\"}}\n Slice {Fat {value 35, unit \"g\"}}\n Cheddar\n \"Cream Cheese\"\n Meat\n or\n \"Salami\" {Producer \"Farmer Bob\"}\n Ham {Producer \"Farmer Sam\"}\n \"Chicken Breast\" {Producer \"Farmer Sam\"}\n Vegetables\n optional\n \"Cucumber\"\n Tomatoes\n Lettuce",
"requestedSolverId": "edu.kit.provideq.toolbox.featuremodel.anomaly.dead.SatBasedDeadFeatureSolver",
"requestedMetaSolverSettings": [],
"requestedSubSolveRequests": {
"sat": {
"requestContent": null,
"requestedSolverId": "edu.kit.provideq.toolbox.sat.solvers.GamsSatSolver",
"requestedMetaSolverSettings": null,
"requestedSubSolveRequests": null
}
}
}We shouldn't work on this in this PR but do you agree that we should change this? |
4ef05a1 to
2391671
Compare
|
I rebased onto dev in order to merge the changes of the Cirq MaxCut Solver |
2391671 to
cddff4c
Compare
schweikart
left a comment
There was a problem hiding this comment.
I've checked everything you've recently addressed, rebased and tried it out on my machine. Seems like this is finally ready to merge!
Initial draft to get automatic documentation for our endpoints in place. A review would already be good at this point.
There are some things that might need a better approach.
For example, the way I convert objects to JSON for the documentation is quite messy with the required try/catch.
Also, there could definitely be more description texts to explain the API in more detail.
I'll probably add descriptions to all the parameters you pass in the future.
I also reworked how arguments are passed into the api tests. They should now test all solvers automatically and they should now use the examples from the documentation. The way I setup the examples was by adding a method to
MetaSolverwhich can be overridden by all individual meta solvers. Do you think that's a good way to do it or would you prefer a more decoupled way?