ConfigMate / configmate-gui

MIT License
1 stars 0 forks source link

Mock ConfigMate Program #20

Closed ktminks closed 11 months ago

ktminks commented 11 months ago

Mock ConfigMate Program

Modify the mock ConfigMate.go program in /bin to:

Modify the ConfigMateProvider.ts to:

Sample request/response objects

Request:

Route: /api/check Method: POST Payload:

{
    "rulebook": "/path/to/rulebook"
}

Response:

[
   {
      "passed": true, // The rule is being met
      "reponse_comment": "Error message produced"
      "token_list": [ // List of text artifacts involved in rule with location information, this information can be used to highlight or underscore these artifacts based on the value of "passed", when hovering over this text artifacts, we can display the usual error message vscode displays for those things using the "response comment".
      {file,row,col,length}, // Maybe also a type... (Value, FieldName, Literal)
      {file,row,col,length},
      ]
   },
   {
   // ...
   },
]