refactor(bruno): standardize all variables to snake_case naming convention
Standardize all Bruno environment variables to use snake_case convention
(aligned with Go naming practices) and remove duplicate camelCase variants.
Changes:
- Environment file cleanup:
- Remove: baseUrl, ebookid, fakebookid, libraryId, mediaItemId, isVisible, refreshToken
- Standardize: fakebookid → fake_book_id, isVisible → is_visible, refreshToken → refresh_token
- All variables now use consistent snake_case format
- Update all Bruno requests to use standardized variables:
- ebooks: {{ebookid}} → {{ebook_id}}
- library: {{libraryId}} → {{library_id}}
- media-items: {{mediaItemId}} → {{media_item_id}}
- visibility: {{isVisible}} → {{is_visible}}
- auth: {{refreshToken}} → {{refresh_token}}
Benefits:
- Single source of truth for each variable
- Consistent with Go naming conventions
- No ambiguity about which variable name to use
- Cleaner, more maintainable codebase
This commit is contained in:
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
url: {{base_url}}/api/ebooks/{{ebookid}}/rating
|
url: {{base_url}}/api/ebooks/{{ebook_id}}/rating
|
||||||
body: json
|
body: json
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete {
|
delete {
|
||||||
url: {{base_url}}/api/ebooks/{{ebookid}}/rating
|
url: {{base_url}}/api/ebooks/{{ebook_id}}/rating
|
||||||
body: none
|
body: none
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: {{base_url}}/api/ebooks/{{ebookid}}/rating
|
url: {{base_url}}/api/ebooks/{{ebook_id}}/rating
|
||||||
body: none
|
body: none
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: {{base_url}}/api/ebooks/{{ebookid}}/ratings
|
url: {{base_url}}/api/ebooks/{{ebook_id}}/ratings
|
||||||
body: none
|
body: none
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: {{base_url}}/api/ebooks/{{ebookid}}
|
url: {{base_url}}/api/ebooks/{{ebook_id}}
|
||||||
body: none
|
body: none
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
vars {
|
vars {
|
||||||
base_url: http://localhost:8765
|
base_url: http://localhost:8765
|
||||||
baseUrl: http://localhost:8765
|
|
||||||
ebookid: 02a535a4-19f8-43fa-b81b-89a226d19dd9
|
|
||||||
fakebookid: 123e4567-e89b-12d3-a456-426614174000
|
|
||||||
user_id: c51118f0-31fc-4c32-827d-517d6599bf21
|
|
||||||
ebook_id: 02a535a4-19f8-43fa-b81b-89a226d19dd9
|
ebook_id: 02a535a4-19f8-43fa-b81b-89a226d19dd9
|
||||||
|
fake_book_id: 123e4567-e89b-12d3-a456-426614174000
|
||||||
|
user_id: c51118f0-31fc-4c32-827d-517d6599bf21
|
||||||
media_item_id: 550e8400-e29b-41d4-a716-446655440000
|
media_item_id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
highlight_id: 660f9501-f29b-51d4-b716-446655440001
|
highlight_id: 660f9501-f29b-51d4-b716-446655440001
|
||||||
note_id: 7710a602-g29b-61d4-c716-446655440002
|
note_id: 7710a602-g29b-61d4-c716-446655440002
|
||||||
libraryId: 8821b703-h29b-71d4-d716-446655440003
|
|
||||||
library_id: 8821b703-h29b-71d4-d716-446655440003
|
library_id: 8821b703-h29b-71d4-d716-446655440003
|
||||||
mediaItemId: 9932c704-i29b-81d4-e716-446655440004
|
|
||||||
media_item_id: 9932c704-i29b-81d4-e716-446655440004
|
|
||||||
job_id: 550e8400-e29b-41d4-a716-446655440000
|
job_id: 550e8400-e29b-41d4-a716-446655440000
|
||||||
rating: 5
|
rating: 5
|
||||||
isVisible: true
|
is_visible: true
|
||||||
}
|
}
|
||||||
vars:secret [
|
vars:secret [
|
||||||
token
|
token
|
||||||
refreshToken
|
refresh_token
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
url: {{base_url}}/api/libraries/{{libraryId}}/folders
|
url: {{base_url}}/api/libraries/{{library_id}}/folders
|
||||||
auth: inherit
|
auth: inherit
|
||||||
body: json
|
body: json
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: {{base_url}}/api/libraries/{{libraryId}}/folders
|
url: {{base_url}}/api/libraries/{{library_id}}/folders
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ headers {
|
|||||||
|
|
||||||
body:json {
|
body:json {
|
||||||
{
|
{
|
||||||
"library_id": "{{libraryId}}",
|
"library_id": "{{library_id}}",
|
||||||
"is_visible": {{isVisible}}
|
"is_visible": {{is_visible}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
url: {{base_url}}/api/media-items/{{mediaItemId}}/rating
|
url: {{base_url}}/api/media-items/{{media_item_id}}/rating
|
||||||
auth: inherit
|
auth: inherit
|
||||||
body: json
|
body: json
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: {{base_url}}/api/media-items/{{mediaItemId}}
|
url: {{base_url}}/api/media-items/{{media_item_id}}
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: {{base_url}}/api/media-items?library_id={{libraryId}}&limit=20&offset=0
|
url: {{base_url}}/api/media-items?library_id={{library_id}}&limit=20&offset=0
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: {{base_url}}/api/ebooks/{{ebookid}}/progress
|
url: {{base_url}}/api/ebooks/{{ebook_id}}/progress
|
||||||
body: none
|
body: none
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
put {
|
put {
|
||||||
url: {{base_url}}/api/ebooks/{{ebookid}}/progress
|
url: {{base_url}}/api/ebooks/{{ebook_id}}/progress
|
||||||
body: json
|
body: json
|
||||||
auth: inherit
|
auth: inherit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
"body": {
|
"body": {
|
||||||
"type": "json",
|
"type": "json",
|
||||||
"json": {
|
"json": {
|
||||||
"refresh_token": "{{refreshToken}}"
|
"refresh_token": "{{refresh_token}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/auth/logout",
|
"raw": "{{base_url}}/api/auth/logout",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{base_url}}"],
|
||||||
"path": ["api", "auth", "logout"]
|
"path": ["api", "auth", "logout"]
|
||||||
},
|
},
|
||||||
"description": "Logs out the user by revoking their refresh token. If no refresh token is provided, the request succeeds but no token is revoked."
|
"description": "Logs out the user by revoking their refresh token. If no refresh token is provided, the request succeeds but no token is revoked."
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/auth/logout",
|
"raw": "{{base_url}}/api/auth/logout",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{base_url}}"],
|
||||||
"path": ["api", "auth", "logout"]
|
"path": ["api", "auth", "logout"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -65,8 +65,8 @@
|
|||||||
"json": {}
|
"json": {}
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/auth/logout",
|
"raw": "{{base_url}}/api/auth/logout",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{base_url}}"],
|
||||||
"path": ["api", "auth", "logout"]
|
"path": ["api", "auth", "logout"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
"body": {
|
"body": {
|
||||||
"type": "json",
|
"type": "json",
|
||||||
"json": {
|
"json": {
|
||||||
"refresh_token": "{{refreshToken}}"
|
"refresh_token": "{{refresh_token}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/auth/refresh",
|
"raw": "{{base_url}}/api/auth/refresh",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{base_url}}"],
|
||||||
"path": ["api", "auth", "refresh"]
|
"path": ["api", "auth", "refresh"]
|
||||||
},
|
},
|
||||||
"description": "Refreshes an access token using a valid refresh token. Returns a new access token with 1-hour expiration."
|
"description": "Refreshes an access token using a valid refresh token. Returns a new access token with 1-hour expiration."
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/auth/refresh",
|
"raw": "{{base_url}}/api/auth/refresh",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{base_url}}"],
|
||||||
"path": ["api", "auth", "refresh"]
|
"path": ["api", "auth", "refresh"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -67,8 +67,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"raw": "{{baseUrl}}/api/auth/refresh",
|
"raw": "{{base_url}}/api/auth/refresh",
|
||||||
"host": ["{{baseUrl}}"],
|
"host": ["{{base_url}}"],
|
||||||
"path": ["api", "auth", "refresh"]
|
"path": ["api", "auth", "refresh"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user