Skip to content

Commit

Permalink
feat: have a generic footer for usecases with rapidoc route
Browse files Browse the repository at this point in the history
  • Loading branch information
stnmtz committed Oct 12, 2023
1 parent 60d314c commit fe4c263
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ defaults:
path: ""
type: docs_use-cases
values:
layout: single
layout: usecase
author_profile: false
sidebar:
- title: "Use-Cases enmeshed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@

{% include properties_list.html %}

This use-case is intended to create one request for a single peer. One should [check if outgoing request can be created](use-case-consumption-check-if-outgoing-request-can-be-created) before creating the request with this use-case.
This use-case is intended to create an actionable [LocalRequest](integrate/data-model-overview#localrequest) based on a given `request` (as a [Request](integrate/data-model-overview#localrequest) datastructure) for a given `peer`. One can (and should) [check if the outgoing request can be created](use-case-consumption-check-if-outgoing-request-can-be-created) before creating the request with this use-case.

## Parameters

- The content for the to be created request is described in the [data model](/integrate/data-model-overview#request).
- The peer is the address of the recipient of this request. There can only be one peer per request.
- The `content` for the to be created request is described in the [data model](integrate/data-model-overview#request).
- The `peer` is the address of the recipient of this request. There can only be one peer per request.

## On Success

- The [LocalRequest](http://localhost:4000/integrate/data-model-overview#localrequest) is created but so far not sent to the peer. It needs to be manually submitted to the peer, e.g. [by sending a message](http://localhost:4000/integrate/requests-over-messages).
- A [LocalRequest](integrate/data-model-overview#localrequest) for the given parameters is created in status `Draft` but so far not sent to the given peer.
- It needs to be manually submitted to the peer, e.g. [by sending a message](integrate/requests-over-messages).

## On Failure

- The request cannot be created if the peer is unknown.
- The request cannot be created if the request content is malformed. Please [check if the outgoing request can be created](use-case-consumption-check-if-outgoing-request-can-be-created) for more details.

{% include usecase_connector_intro %}

{% include rapidoc %}
4 changes: 2 additions & 2 deletions _includes/usecase_connector_intro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## How to execute this use-case with the Connector?
<h2>How to execute this use-case with the Connector?</h2>

The Connector is our first-class citizen, thus we provide you with a detailed API description for every use-case.
This use-case can be executed with the REST API of the Connector which you can [Access the Connector](/integrate/access-the-connector).
This use-case can be executed with the REST API of the Connector which you can <a href="/integrate/access-the-connector">Access the Connector</a>.
14 changes: 14 additions & 0 deletions _layouts/usecase.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: single
---

{{ content }}


{% if page.api_route_regex != "" %}

{% include usecase_connector_intro %}

{% include rapidoc %}

{% endif %}

0 comments on commit fe4c263

Please sign in to comment.