docs: Add regenerate code instructions to readme
This commit is contained in:
parent
9699b2823e
commit
4953784be4
21
README.md
21
README.md
|
|
@ -23,4 +23,23 @@ void main() async {
|
|||
## Generated code
|
||||
|
||||
The files in `lib/src/generated` are generated by [dart_openapi_codegen](https://gitlab.com/famedly/company/frontend/dart_openapi_codegen/)
|
||||
from [matrix-spec](https://github.com/matrix-org/matrix-spec/). See the README.md in dart_openapi_codegen for more information.
|
||||
from [matrix-spec](https://github.com/matrix-org/matrix-spec/).
|
||||
|
||||
To regenerate the code, follow these steps:
|
||||
|
||||
1. Clone both repositories next to each other
|
||||
1.1 `git clone git@gitlab.com:famedly/company/frontend/dart_openapi_codegen.git`
|
||||
1.2 `git clone git@gitlab.com:famedly/company/frontend/libraries/matrix_api_lite.git`
|
||||
2. Execute the script in the dart_openapi_codegen directory:
|
||||
```sh
|
||||
cd dart_openapi_codegen
|
||||
./scripts/matrix.sh ../matrix_api_lite/lib/src/generated
|
||||
cd ..
|
||||
```
|
||||
3. Run the build_runner in the matrix_api_lite directory:
|
||||
```sh
|
||||
cd matrix_api_lite
|
||||
dart pub get
|
||||
dart run build_runner build
|
||||
```
|
||||
4. Check lints and tests and create a merge request
|
||||
Loading…
Reference in New Issue