Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate swagger/graphql schema files from api #8777

Merged
merged 11 commits into from
Mar 13, 2024
Merged

Conversation

floreks
Copy link
Member

@floreks floreks commented Mar 12, 2024

  • Add go-restful-openapi package support to API module
  • Add make schema targets to modules/api, modules/web and root makefiles
  • Improve apihandler.go routes documentation to generate proper swagger schema
  • Generate swagger v2 schema for API module and save in modules/api/schema/swagger.json
  • Generate graphql schema from swagger schema and save in modules/web/schema/schema.graphql
  • Add openapi-enabled arg to API. It enables /apidocs.json endpoint with swagger schema.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floreks

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 12, 2024
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Merging #8777 (c783867) into master (a370d5b) will increase coverage by 1.94%.
Report is 1 commits behind head on master.
The diff coverage is 97.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8777      +/-   ##
==========================================
+ Coverage   35.60%   37.55%   +1.94%     
==========================================
  Files         255      255              
  Lines       10782    11145     +363     
  Branches      142      142              
==========================================
+ Hits         3839     4185     +346     
- Misses       6730     6747      +17     
  Partials      213      213              

@floreks floreks marked this pull request as draft March 12, 2024 17:49
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 12, 2024
@floreks floreks self-assigned this Mar 13, 2024
@floreks floreks added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 13, 2024
@floreks floreks marked this pull request as ready for review March 13, 2024 13:24
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 13, 2024
@floreks floreks added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 13, 2024
@floreks floreks merged commit 1d4897c into master Mar 13, 2024
13 of 15 checks passed
@floreks floreks deleted the feat/openapi branch March 13, 2024 13:44
kireque referenced this pull request in kireque/home-ops Apr 4, 2024
)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [kubernetes-dashboard](https://togithub.com/kubernetes/dashboard) |
patch | `7.1.2` -> `7.1.3` |

---

### Release Notes

<details>
<summary>kubernetes/dashboard (kubernetes-dashboard)</summary>

###
[`v7.1.3`](https://togithub.com/kubernetes/dashboard/releases/tag/kubernetes-dashboard-7.1.3)

[Compare
Source](https://togithub.com/kubernetes/dashboard/compare/kubernetes-dashboard-7.1.2...kubernetes-dashboard-7.1.3)

#### What's Changed

- chore: fix some typos by
[@&#8203;vitalmotif](https://togithub.com/vitalmotif) in
[https://github.com/kubernetes/dashboard/pull/8821](https://togithub.com/kubernetes/dashboard/pull/8821)

##### API

- feat: generate swagger/graphql schema files from api by
[@&#8203;floreks](https://togithub.com/floreks) in
[https://github.com/kubernetes/dashboard/pull/8777](https://togithub.com/kubernetes/dashboard/pull/8777)

##### Web

- fix: login guard and me service initialization by
[@&#8203;floreks](https://togithub.com/floreks) in
[https://github.com/kubernetes/dashboard/pull/8840](https://togithub.com/kubernetes/dashboard/pull/8840)

##### Helm Chart

- feat(chart): bump chart to 7.1.3 by
[@&#8203;floreks](https://togithub.com/floreks) in
[https://github.com/kubernetes/dashboard/pull/8841](https://togithub.com/kubernetes/dashboard/pull/8841)
-   Change the default number of replicas for API deployment from 3 to 1
- Update `kong_dns_order` entry in an attempt to mitigate latency issues

#### New Contributors

- [@&#8203;vitalmotif](https://togithub.com/vitalmotif) made their first
contribution in
[https://github.com/kubernetes/dashboard/pull/8821](https://togithub.com/kubernetes/dashboard/pull/8821)

**Full Changelog**:
kubernetes/dashboard@kubernetes-dashboard-7.1.2...kubernetes-dashboard-7.1.3

#### Installation

```sh
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
```

#### Compatibility

| Kubernetes version | 1.27 | 1.28 | 1.29 |
|--------------------|-----|-----|-----|
| Compatibility            | ?   |   ?   |   ✓    |

-   `✓` Fully supported version range.
- `?` Due to breaking changes between Kubernetes API versions, some
features might not work correctly in the Dashboard.

#### Images

    docker.io/kubernetesui/dashboard-api:1.4.0
    docker.io/kubernetesui/dashboard-auth:1.1.2
    docker.io/kubernetesui/dashboard-metrics-scraper:1.1.1
    docker.io/kubernetesui/dashboard-web:1.2.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: kireque-bot[bot] <143391978+kireque-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants