[PR #356] [MERGED] OpenAPI specification and API Adjusts #12529

Closed
opened 2026-08-05 02:06:06 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/356
Author: @mlsmaycon
Created: 6/7/2022
Status: Merged
Merged: 6/14/2022
Merged by: @braginini

Base: mainHead: api-adjusts


📝 Commits (10+)

  • 4ebecf7 Check if token is set
  • db1bf7f Add initial OpenAPI definition
  • 9dda07f Using json patch objects for Rule Patch
  • e964530 Adding field descriptions
  • 945d02b Merge branch 'main' into api-adjusts
  • 83330fa Add documentation and error responses
  • c4134d8 Add OpenAPI generate script
  • e6c5262 Generate API types and validate incoming requests
  • af89da9 Remove validation due to Security Advisories on indirect
  • 85bfd30 Removed Patch operations

📊 Changes

24 files changed (+2506 additions, -311 deletions)

View changed files

📝 go.mod (+6 -5)
📝 go.sum (+13 -10)
📝 management/server/account.go (+25 -6)
📝 management/server/file_store.go (+1 -1)
📝 management/server/group.go (+70 -0)
management/server/http/api/cfg.yaml (+5 -0)
management/server/http/api/generate.sh (+16 -0)
management/server/http/api/openapi.yml (+942 -0)
management/server/http/api/types.gen.go (+339 -0)
📝 management/server/http/handler/groups.go (+239 -53)
📝 management/server/http/handler/groups_test.go (+122 -13)
📝 management/server/http/handler/peers.go (+40 -45)
📝 management/server/http/handler/peers_test.go (+4 -3)
📝 management/server/http/handler/rules.go (+294 -68)
📝 management/server/http/handler/rules_test.go (+118 -21)
📝 management/server/http/handler/setupkeys.go (+25 -50)
📝 management/server/http/handler/users.go (+8 -26)
📝 management/server/http/handler/util.go (+17 -0)
📝 management/server/http/server.go (+8 -7)
📝 management/server/jwtclaims/extractor.go (+3 -0)

...and 4 more files

📄 Description

Introduced an OpenAPI specification
Updated API handlers to use the specification types

Added patch operation for rules and groups
And methods on account manager

Put operations require id

Updated field case for request and response body


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/356 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 6/7/2022 **Status:** ✅ Merged **Merged:** 6/14/2022 **Merged by:** [@braginini](https://github.com/braginini) **Base:** `main` ← **Head:** `api-adjusts` --- ### 📝 Commits (10+) - [`4ebecf7`](https://github.com/netbirdio/netbird/commit/4ebecf7f3d073fd48bee0f795a8e4725b935f5b9) Check if token is set - [`db1bf7f`](https://github.com/netbirdio/netbird/commit/db1bf7f9c4d72a2ea8d7f675a2112a302eab2628) Add initial OpenAPI definition - [`9dda07f`](https://github.com/netbirdio/netbird/commit/9dda07fd0594a372996047f8c2b9f0069b4cca28) Using json patch objects for Rule Patch - [`e964530`](https://github.com/netbirdio/netbird/commit/e964530e5481b31ef84b662581b3359e8d7a611c) Adding field descriptions - [`945d02b`](https://github.com/netbirdio/netbird/commit/945d02bfb389da2778965c338ddcf0783f68f106) Merge branch 'main' into api-adjusts - [`83330fa`](https://github.com/netbirdio/netbird/commit/83330faf83068978599578586bbbd08087c70373) Add documentation and error responses - [`c4134d8`](https://github.com/netbirdio/netbird/commit/c4134d872239d761fd2181fd69a86534f9b8ebac) Add OpenAPI generate script - [`e6c5262`](https://github.com/netbirdio/netbird/commit/e6c526262bc902bb10e04e7e0bfd6e173bbf598b) Generate API types and validate incoming requests - [`af89da9`](https://github.com/netbirdio/netbird/commit/af89da9bae49b799dc4c286ee8c02fb0dc304c7e) Remove validation due to Security Advisories on indirect - [`85bfd30`](https://github.com/netbirdio/netbird/commit/85bfd30fb9943774e610766d8e6e409ef5a50344) Removed Patch operations ### 📊 Changes **24 files changed** (+2506 additions, -311 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+6 -5) 📝 `go.sum` (+13 -10) 📝 `management/server/account.go` (+25 -6) 📝 `management/server/file_store.go` (+1 -1) 📝 `management/server/group.go` (+70 -0) ➕ `management/server/http/api/cfg.yaml` (+5 -0) ➕ `management/server/http/api/generate.sh` (+16 -0) ➕ `management/server/http/api/openapi.yml` (+942 -0) ➕ `management/server/http/api/types.gen.go` (+339 -0) 📝 `management/server/http/handler/groups.go` (+239 -53) 📝 `management/server/http/handler/groups_test.go` (+122 -13) 📝 `management/server/http/handler/peers.go` (+40 -45) 📝 `management/server/http/handler/peers_test.go` (+4 -3) 📝 `management/server/http/handler/rules.go` (+294 -68) 📝 `management/server/http/handler/rules_test.go` (+118 -21) 📝 `management/server/http/handler/setupkeys.go` (+25 -50) 📝 `management/server/http/handler/users.go` (+8 -26) 📝 `management/server/http/handler/util.go` (+17 -0) 📝 `management/server/http/server.go` (+8 -7) 📝 `management/server/jwtclaims/extractor.go` (+3 -0) _...and 4 more files_ </details> ### 📄 Description Introduced an OpenAPI specification Updated API handlers to use the specification types Added patch operation for rules and groups And methods on account manager Put operations require id Updated field case for request and response body --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:06:06 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12529