Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ The static files (`html`, `js`, and `css`) are generated by `yarn`, embedded in

# API

The backend API is documented in the [rest API guide](rest-api.md)
The backend API is documented in the [Rest API guide](rest-api.md)

# Development

Each one of the following sections describes an alternative method to run the project from sources. You may use the one that suits your needs.

They all require the project is cloned into your `$GOPATH`.
They all require that the project is cloned into your `$GOPATH`.

```bash
$ go get -d -u github.com/src-d/gitbase-web/...
Expand All @@ -83,7 +83,7 @@ This will start a server locally, which you can access at [http://localhost:8080

## Run Using webpack Hot Module Replacement

Instead of rebuilding the frontend and restarting the backend every time you do a change, you may instead run the backend to provide the API, and use webpack to serve the frontend.
Instead of rebuilding the frontend and restarting the backend every time you make a change, you may instead run the backend to provide the API, and use webpack to serve the frontend.

In one terminal run the Go backend:

Expand Down
10 changes: 5 additions & 5 deletions docs/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Receives an SQL query and forwards it to the `gitbase` server.

The request body can have:

* `query`: An SQL statement string. Do not include `LIMIT` here.
* `query`: A SQL statement string. Do not include `LIMIT` here.
* `limit`: Number, will be added as SQL `LIMIT` to the query. Optional. Will also be ignored if it is 0.

The success response will contain:
Expand Down Expand Up @@ -109,7 +109,7 @@ curl -X POST \
}
```

A failure:
A failure response:

```bash
curl -X POST \
Expand All @@ -134,7 +134,7 @@ curl -X POST \
}
```

For a query with uast nodes the protobuf response is unmarshalled and the json is returned:
For a query with UAST nodes, the protobuf response is unmarshalled and the JSON is returned:

```bash
curl -X POST \
Expand Down Expand Up @@ -245,7 +245,7 @@ curl -X POST \

The endpoint also receives additional parameters:

- `serverUrl` - allows to override bblfsh server url.
- `serverUrl` - allows to override bblfsh server URL.
- `filename` - can be used instead of language. Then the bblfsh server would try to guess the language.
- `filter` - [xpath query](https://doc.bblf.sh/user/uast-querying.html) to filter the results.

Expand Down Expand Up @@ -314,7 +314,7 @@ curl -X GET http://localhost:8080/get-languages
## POST /filter

Accepts an array of UAST protobufs encoded using base64 and a UAST filter query.
Returns the filtered UAST JSON as result.
Returns the resulting filtered UAST JSON.

```bash
curl -X POST \
Expand Down