mirror of
https://github.com/jellyfin/jellyfin-sdk-swift.git
synced 2024-11-23 06:09:58 +00:00
Make (#25)
This commit is contained in:
parent
7dbcd9dc46
commit
d19dc290df
13
Makefile
Normal file
13
Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
# Download latest spec and run CreateAPI
|
||||
.PHONY: update
|
||||
update: download generate
|
||||
|
||||
# Download the latest Jellyfin spec
|
||||
.PHONY: download
|
||||
download:
|
||||
curl -fsSl https://api.jellyfin.org/openapi/jellyfin-openapi-stable.json -o Sources/jellyfin-openapi-stable.json
|
||||
|
||||
# Run CreateAPI
|
||||
.PHONY: generate
|
||||
generate:
|
||||
swift package --allow-writing-to-package-directory generate-api
|
12
README.md
12
README.md
@ -24,17 +24,9 @@ Alternatively, you can use your own network stack with the generated **Entities*
|
||||
|
||||
## Generation
|
||||
|
||||
The mechanism for generating **Entities**, **Extensions**, and **Paths** with CreateAPI is provided as an Xcode command plugin.
|
||||
|
||||
1. Download [the latest Jellyfin schema](https://api.jellyfin.org/openapi/jellyfin-openapi-stable.json)
|
||||
2. Move the schema to **Sources**
|
||||
3. Delete the current **Entities**, **Extensions**, and **Paths** directories
|
||||
4. Run the following command in the package directory:
|
||||
|
||||
```bash
|
||||
# runs the CreateAPI Xcode command plugin
|
||||
$ swift package --allow-writing-to-package-directory generate-api
|
||||
# Download latest spec and run CreateAPI
|
||||
$ make update
|
||||
```
|
||||
5. New **Entities**, **Extensions**, and **Paths** directories should be available within the package
|
||||
|
||||
Alternatively, you can generate your own Swift Jellyfin SDK using [CreateAPI](https://github.com/CreateAPI/CreateAPI) or any other OpenAPI generator.
|
Loading…
Reference in New Issue
Block a user