Skip to content

Commit 503d06f

Browse files
committed
WIP #259
1 parent f9ba839 commit 503d06f

2 files changed

Lines changed: 26 additions & 16 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Endpoints
2+
**Endpoints** are fundamental to this extension; they are .NET class instances which describe a piece of API functionality which may be consumed.
3+
The single most important (and obvious) piece of information stored in an endpoint object is the URL (route) which is used to communicate with the API function.
4+
## Three endpoint classes
5+
The WebAPIs extension offers three classes for which to use in defining the endpoints which you consume.
6+
7+
8+
9+
, first class concept in this extension. An endpoint object is used to define:
10+
11+
* The URL (route) at which the endpoint is found
12+
* Whether use of the endpoint requires any parameters
13+
* How many parameters
14+
* The .NET types of the parameter values
15+
* How those parameters are communicated to the endpoint
16+
* The endpoint's expected response/result type, if it is expected to return one
17+
18+
Users of this extension *are encouraged to build a library of endpoint objects*, describing the 'surface area' of the API that they wish to exercise.

CSF.Screenplay.Docs/docs/extensions/webApis/index.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The Web APIs Extension allows [Actors] to communicate with HTTP web API endpoints within a Screenplay [Performance].
44

5+
[Actors]: xref:CSF.Screenplay.Actor
6+
[Performance]: xref:CSF.Screenplay.IPerformance
57
## Overview
68

79
The diagram below shows how this extension works.
@@ -20,27 +22,17 @@ erDiagram
2022
Ability ||--|| api : sends
2123
api ||--|| Response : returns
2224
Response }o--|| Actor : recieves
25+
2326
style api fill:#ee9,stroke:#bb6
2427
```
2528

2629
[Actor]: xref:CSF.Screenplay.Actor
2730
[Ability]: xref:AbilityGlossaryItem
2831
[`MakeWebApiRequests`]: xref:CSF.Screenplay.WebApis.MakeWebApiRequests
2932

30-
## Endpoints
31-
32-
**Endpoints** are a fundamental, first class concept in this extension. An endpoint object is used to define:
33-
34-
* The URL (route) at which the endpoint is found
35-
* Whether use of the endpoint requires any parameters
36-
* How many parameters
37-
* The .NET types of the parameter values
38-
* How those parameters are communicated to the endpoint
39-
* The endpoint's expected response/result type, if it is expected to return one
33+
This extension provides **[Actions]** which allow the Actor to build and send [HTTP requests] based upon [Endpoint] definitions.
34+
These requests are sent via the HTTP client which is exposed by the [`MakeWebApiRequests`] Ability, to a live API server.
35+
The server returns an [HTTP Response], which the extension formats into a result object.
4036

41-
Users of this extension *are encouraged to build a library of endpoint objects*, describing the 'surface area' of the API that they wish to exercise.
42-
43-
[Actors]: xref:CSF.Screenplay.Actor
44-
[Performance]: xref:CSF.Screenplay.IPerformance
45-
[Actions]: ../../glossary/Action.md
46-
[Questions]: ../../glossary/Question.md
37+
[Actions]: ../../../glossary/Action.md
38+
[Endpoint]: Endpoints.md

0 commit comments

Comments
 (0)