Skip to content

Commit 61dc5ff

Browse files
authored
Merge pull request #106 from thc202/add-long-desc
Restructure docs to use README as long desc
2 parents c0e5ce3 + 3f21ec6 commit 61dc5ff

File tree

4 files changed

+37
-31
lines changed

4 files changed

+37
-31
lines changed

CONTRIBUTING.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Contributing to zap-api-python
2+
3+
## Updating the Generated Files
4+
5+
Most of the API code is generated from the ZAP java source code.
6+
7+
To regenerate the API code you will need the repos [zaproxy](https://github.com/zaproxy/zaproxy) and [zap-extensions](https://github.com/zaproxy/zap-extensions) checked out at the same level as this one.
8+
9+
You should typically generate the core API calls from the latest release tag e.g.:
10+
11+
```
12+
cd zaproxy
13+
git fetch upstream -t
14+
git checkout tags/v2.13.0
15+
./gradlew generatePythonApiEndpoints
16+
cd ..
17+
```
18+
19+
The add-on APIs can be generated from the zap-extensions `main` branch:
20+
21+
```
22+
cd zap-extensions
23+
git pull upstream main
24+
./gradle generatePythonZapApiClientFiles --continue
25+
cd ..
26+
```
27+
28+
The above commands will update the files in `src/zapv2`.
29+
30+
If any new files are created then they should be manually added to `src/zapv2/__init__.py` as per the existing files.
31+
32+
## Changelog
33+
34+
Note that you should also update the `CHANGELOG.md` file to state whatever has been changed.

README.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,3 @@ For help using the ZAP API, refer to:
2222
## Issues
2323

2424
To report issues related to ZAP API, bugs and enhancements requests, use the [issue tracker of the main ZAP project](https://github.com/zaproxy/zaproxy/issues).
25-
26-
## Updating the Generated Files
27-
28-
Most of the API code is generated from the ZAP java source code.
29-
30-
To regenerate the API code you will need the repos [zaproxy](https://github.com/zaproxy/zaproxy) and [zap-extensions](https://github.com/zaproxy/zap-extensions) checked out at the same level as this one.
31-
32-
You should typically generate the core API calls from the latest release tag e.g.:
33-
34-
```
35-
cd zaproxy
36-
git fetch upstream -t
37-
git checkout tags/v2.13.0
38-
./gradlew generatePythonApiEndpoints
39-
cd ..
40-
```
41-
42-
The add-on APIs can be generated from the zap-extensions `main` branch:
43-
44-
```
45-
cd zap-extensions
46-
git pull upstream main
47-
./gradle generatePythonZapApiClientFiles --continue
48-
cd ..
49-
```
50-
51-
The above commands will update the files in `src/zapv2`.
52-
53-
If any new files are created then they should be manually added to `src/zapv2/__init__.py` as per the existing files.
54-
55-
Note that you should also update the `CHANGELOG.md` file to state whatever has been changed.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ name = "zaproxy"
77
# Ensure __version__ in src/zapv2/__init__.py matches.
88
version = "0.3.0"
99
description = "ZAP API Client"
10+
readme = "README.md"
1011
authors = ["ZAP Development Team <[email protected]>"]
1112
license = "Apache-2.0"
1213

src/zapv2/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
from .brk import brk
3939
from .context import context
4040
from .core import core
41+
from .custompayloads import custompayloads
4142
from .exim import exim
4243
from .forcedUser import forcedUser
4344
from .graphql import graphql
@@ -103,6 +104,7 @@ def __init__(self, proxies=None, apikey=None, validate_status_code=False):
103104
self.brk = brk(self)
104105
self.context = context(self)
105106
self.core = core(self)
107+
self.custompayloads = custompayloads(self)
106108
self.exim = exim(self)
107109
self.forcedUser = forcedUser(self)
108110
self.graphql = graphql(self)

0 commit comments

Comments
 (0)