diff --git a/lib/pact_broker/doc/views/index/pacticipant-branch.markdown b/lib/pact_broker/doc/views/index/pacticipant-branch.markdown new file mode 100644 index 000000000..481d29518 --- /dev/null +++ b/lib/pact_broker/doc/views/index/pacticipant-branch.markdown @@ -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 diff --git a/spec/lib/pact_broker/doc/coverage_spec.rb b/spec/lib/pact_broker/doc/coverage_spec.rb index 95c6704f1..19e6ecc34 100644 --- a/spec/lib/pact_broker/doc/coverage_spec.rb +++ b/spec/lib/pact_broker/doc/coverage_spec.rb @@ -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