Skip to content

Commit

Permalink
Applied additional suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
lampajr committed Mar 26, 2024
1 parent 1baa755 commit 6b774ac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-openapi-change.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
check-openapi-change:
name: check-openapi-change-${{ github.event.client_payload.branch }}
name: check-openapi-change ${{ github.event.client_payload.branch }}
runs-on: ubuntu-latest
env:
FORCE_COLOR: "1"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ bin/
# Openapi
openapi/openapi.yaml

# Generate code
# Generated code
src/horreum/raw_client/**
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ HORREUM_BRANCH ?= "master"
HORREUM_OPENAPI_PATH ?= "https://raw.githubusercontent.com/Hyperfoil/Horreum/${HORREUM_BRANCH}/docs/site/content/en/openapi/openapi.yaml"
GENERATED_CLIENT_PATH = "${PROJECT_PATH}/src/horreum/raw_client"
OPENAPI_PATH = "${PROJECT_PATH}/openapi"
OPENAPI_SPEC = "${OPENAPI_PATH}/openapi.yaml"

.PHONY: help
help: ## Display this help.
Expand Down Expand Up @@ -63,11 +64,17 @@ ${PROJECT_BIN}/kiota:
.PHONY: tools
tools: kiota ## Install external tools.

.PHONY: generate
generate: tools ## Generate the Horreum client
${OPENAPI_SPEC}:
@{\
set -e ;\
mkdir -p ${OPENAPI_PATH} ;\
curl -sSfL -o ${OPENAPI_PATH}/openapi.yaml ${HORREUM_OPENAPI_PATH} ;\
echo "fetching openapi spec from ${HORREUM_OPENAPI_PATH}" ;\
curl -sSfL -o ${OPENAPI_SPEC} ${HORREUM_OPENAPI_PATH} ;\
}

.PHONY: generate
generate: tools ${OPENAPI_SPEC} ## Generate the Horreum client
@{\
set -e ;\
${PROJECT_BIN}/kiota generate -l python -c HorreumRawClient -n raw_client -d ${OPENAPI_PATH}/openapi.yaml -o ${GENERATED_CLIENT_PATH} ;\
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ nox -l
```

And execute them by running:
```bash
nox -s [session]
```
nox -s <session>
```

Right now integrations tests are not fully automated, therefore you need to start up the Horreum server manually,
Expand Down

0 comments on commit 6b774ac

Please sign in to comment.