mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-21 14:49:36 +08:00
rename apidocs into api (#4844)
this is to follow standard Golang project layout
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# do not add /binaries, since it is needed by Docker images
|
||||
/tmp
|
||||
/coverage*.txt
|
||||
/apidocs/*.html
|
||||
/api/*.html
|
||||
/internal/core/VERSION
|
||||
/internal/servers/hls/hls.min.js
|
||||
/internal/staticsources/rpicamera/mtxrpicam_*/
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -170,9 +170,9 @@ jobs:
|
||||
|
||||
- run: make apidocs
|
||||
|
||||
- run: mv apidocs/*.html apidocs/index.html
|
||||
- run: mv api/*.html api/index.html
|
||||
|
||||
- uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./apidocs
|
||||
publish_dir: ./api
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,7 @@
|
||||
/tmp
|
||||
/binaries
|
||||
/coverage*.txt
|
||||
/apidocs/*.html
|
||||
/api/*.html
|
||||
/internal/core/VERSION
|
||||
/internal/servers/hls/hls.min.js
|
||||
/internal/staticsources/rpicamera/mtxrpicam_*/
|
||||
|
@@ -2146,7 +2146,7 @@ To obtain a list of of active paths, run:
|
||||
curl http://127.0.0.1:9997/v3/paths/list
|
||||
```
|
||||
|
||||
Full documentation of the Control API is available on the [dedicated site](https://bluenviron.github.io/mediamtx/).
|
||||
The control API is documented in the [OpenAPI / Swagger file](api/openapi.yaml) and in a [dedicated site](https://bluenviron.github.io/mediamtx/).
|
||||
|
||||
Be aware that by default the Control API is accessible by localhost only; to increase visibility or add authentication, check [Authentication](#authentication).
|
||||
|
||||
|
@@ -33,7 +33,7 @@ type openAPI struct {
|
||||
}
|
||||
|
||||
func TestAPIDocs(t *testing.T) {
|
||||
byts, err := os.ReadFile("../../apidocs/openapi.yaml")
|
||||
byts, err := os.ReadFile("../../api/openapi.yaml")
|
||||
require.NoError(t, err)
|
||||
|
||||
var doc openAPI
|
||||
|
@@ -6,5 +6,5 @@ export DOCKERFILE_APIDOCS_GEN
|
||||
|
||||
apidocs:
|
||||
echo "$$DOCKERFILE_APIDOCS_GEN" | docker build . -f - -t temp
|
||||
docker run --rm -v "$(shell pwd)/apidocs:/s" -w /s temp \
|
||||
docker run --rm -v "$(shell pwd)/api:/s" -w /s temp \
|
||||
sh -c "redoc-cli bundle openapi.yaml"
|
||||
|
@@ -15,7 +15,7 @@ lint-mod-tidy:
|
||||
|
||||
lint-apidocs:
|
||||
echo "$$DOCKERFILE_APIDOCS_LINT" | docker build . -f - -t temp
|
||||
docker run --rm -v "$(shell pwd)/apidocs:/s" -w /s temp \
|
||||
docker run --rm -v "$(shell pwd)/api:/s" -w /s temp \
|
||||
sh -c "openapi lint openapi.yaml"
|
||||
|
||||
lint: lint-golangci lint-mod-tidy lint-apidocs
|
||||
|
Reference in New Issue
Block a user