Skip to content

Commit

Permalink
docs: add HAL docs for pacticipant-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Mar 22, 2024
1 parent fd75740 commit d7d4605
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/pact_broker/doc/views/index/pacticipant-branch.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Pacticipant branch

Allowed methods: `GET`, `DELETE`

Path: `/pacticipants/{pacticipant}/branches/{branch}`

Get or delete a pacticipant branch.

## Create

Branches cannot be created via the resource URL. They are created automatically when publishing contracts.

## Get

### Example

curl http://broker/pacticipants/Bar/branches/main -H "Accept: application/hal+json"

## Delete

Deletes a pacticipant branch. Does NOT delete the associated pacticipant versions.

Send a `DELETE` request to the branch resource.

curl -XDELETE http://broker/pacticipants/Bar/branches/main
2 changes: 2 additions & 0 deletions spec/lib/pact_broker/doc/coverage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
RSpec.describe "the HAL docs for the index" do

let(:app) do
require "pact_broker/api"

Rack::Builder.new do
map "/docs" do
run PactBroker::Doc::Controllers::App
Expand Down

0 comments on commit d7d4605

Please sign in to comment.