Skip to content

Commit

Permalink
feat: Update from Netbox 3.1 swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
smutel committed May 16, 2022
1 parent ec1cfe1 commit 8882546
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ jobs:
uses: Namchee/[email protected]
with:
access_token: ${{ secrets.github_token }}
label: "no-conventional-commits"
close: false
template: "Thank you for your contribution attempt in this repository!\n\nUnfortunately, this pull request doesn't meet our standards by reason we stated below.\nFor future pull requests, please use conventional commits.\nPlease update the commits in this PR with conventional commits rules."
strict: false
report: false

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ func main() {
### Installing the go-netbox

```sh
$ # Install jsonlint
$ apt-get install python3-demjson
$ mkdir -p ~/go/src/github.com/smutel
$ cd ~/go/src/github.com/smutel
$ git clone [email protected]:smutel/go-netbox.git
Expand Down
91 changes: 91 additions & 0 deletions patchs/swagger-v3.1.11-device-vm-localcontextdata.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
--- swagger-v3.1.11.json.ori 2022-05-16 14:48:51.588387301 +0200
+++ swagger-v3.1.11.json 2022-05-16 14:53:12.116003672 +0200
@@ -2369,7 +2369,7 @@
},
"local_context_data" : {
"title" : "Local context data",
- "type" : "string",
+ "type" : "object",
"x-nullable" : true
},
"location" : { "$ref" : "#/definitions/NestedLocation" },
@@ -2888,10 +2888,6 @@
"type" : "string"
},
"config_context" : {
- "additionalProperties" : {
- "type" : "string",
- "x-nullable" : true
- },
"readOnly" : true,
"title" : "Config context",
"type" : "object"
@@ -2951,7 +2947,7 @@
},
"local_context_data" : {
"title" : "Local context data",
- "type" : "string",
+ "type" : "object",
"x-nullable" : true
},
"location" : { "$ref" : "#/definitions/NestedLocation" },
@@ -11401,10 +11397,6 @@
"type" : "string"
},
"config_context" : {
- "additionalProperties" : {
- "type" : "string",
- "x-nullable" : true
- },
"readOnly" : true,
"title" : "Config context",
"type" : "object"
@@ -11445,7 +11437,7 @@
},
"local_context_data" : {
"title" : "Local context data",
- "type" : "string",
+ "type" : "object",
"x-nullable" : true
},
"memory" : {
@@ -14251,10 +14243,6 @@
"type" : "string"
},
"config_context" : {
- "additionalProperties" : {
- "type" : "string",
- "x-nullable" : true
- },
"readOnly" : true,
"title" : "Config context",
"type" : "object"
@@ -14304,7 +14292,7 @@
},
"local_context_data" : {
"title" : "Local context data",
- "type" : "string",
+ "type" : "object",
"x-nullable" : true
},
"location" : {
@@ -18739,10 +18727,6 @@
"type" : "string"
},
"config_context" : {
- "additionalProperties" : {
- "type" : "string",
- "x-nullable" : true
- },
"readOnly" : true,
"title" : "Config context",
"type" : "object"
@@ -18783,7 +18767,7 @@
},
"local_context_data" : {
"title" : "Local context data",
- "type" : "string",
+ "type" : "object",
"x-nullable" : true
},
"memory" : {
13 changes: 13 additions & 0 deletions patchs/swagger-v3.1.11-ipaddress-assignedobject.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- swagger-v3.1.11.json.ori 2022-05-16 14:48:51.588387301 +0200
+++ swagger-v3.1.11.json 2022-05-16 15:04:26.365989795 +0200
@@ -4986,10 +4986,6 @@
"type" : "string"
},
"assigned_object" : {
- "additionalProperties" : {
- "type" : "string",
- "x-nullable" : true
- },
"readOnly" : true,
"title" : "Assigned object",
"type" : "object"
2 changes: 1 addition & 1 deletion utils/netbox_generate_client
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export VERSION=${LAST_NETBOX_VERSION}
git clone https://github.com/netbox-community/netbox-docker.git -q
cd netbox-docker
git config advice.detachedHead false
git checkout 1.4.1
git checkout 1.6.0
mv docker-compose.override.yml.example docker-compose.override.yml
docker-compose up -d --quiet-pull
cd ..
Expand Down
2 changes: 1 addition & 1 deletion utils/netbox_major_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.0
v3.1

0 comments on commit 8882546

Please sign in to comment.