Skip to content

Commit d9ee3af

Browse files
Merge pull request #80 from devopsarr/feature/code-generation
feat: remove broken root api path
2 parents 750e8f9 + 7f7aa0f commit d9ee3af

File tree

3 files changed

+1
-335
lines changed

3 files changed

+1
-335
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ Class | Method | HTTP request | Description
308308
*SeriesFolderApi* | [**get_series_folder**](docs/SeriesFolderApi.md#get_series_folder) | **GET** /api/v3/series/{id}/folder |
309309
*SeriesImportApi* | [**create_series_import**](docs/SeriesImportApi.md#create_series_import) | **POST** /api/v3/series/import |
310310
*SeriesLookupApi* | [**list_series_lookup**](docs/SeriesLookupApi.md#list_series_lookup) | **GET** /api/v3/series/lookup |
311-
*StaticResourceApi* | [**get**](docs/StaticResourceApi.md#get) | **GET** / |
312311
*StaticResourceApi* | [**get_by_path**](docs/StaticResourceApi.md#get_by_path) | **GET** /{path} |
313312
*StaticResourceApi* | [**get_content_by_path**](docs/StaticResourceApi.md#get_content_by_path) | **GET** /content/{path} |
314313
*StaticResourceApi* | [**get_login**](docs/StaticResourceApi.md#get_login) | **GET** /login |

docs/StaticResourceApi.md

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -4,92 +4,11 @@ All URIs are relative to *http://localhost:8989*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**get**](StaticResourceApi.md#get) | **GET** / |
87
[**get_by_path**](StaticResourceApi.md#get_by_path) | **GET** /{path} |
98
[**get_content_by_path**](StaticResourceApi.md#get_content_by_path) | **GET** /content/{path} |
109
[**get_login**](StaticResourceApi.md#get_login) | **GET** /login |
1110

1211

13-
# **get**
14-
> get(path)
15-
16-
17-
18-
### Example
19-
20-
* Api Key Authentication (apikey):
21-
* Api Key Authentication (X-Api-Key):
22-
23-
```python
24-
import sonarr
25-
from sonarr.rest import ApiException
26-
from pprint import pprint
27-
28-
# Defining the host is optional and defaults to http://localhost:8989
29-
# See configuration.py for a list of all supported configuration parameters.
30-
configuration = sonarr.Configuration(
31-
host = "http://localhost:8989"
32-
)
33-
34-
# The client must configure the authentication and authorization parameters
35-
# in accordance with the API server security policy.
36-
# Examples for each auth method are provided below, use the example that
37-
# satisfies your auth use case.
38-
39-
# Configure API key authorization: apikey
40-
configuration.api_key['apikey'] = os.environ["API_KEY"]
41-
42-
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
43-
# configuration.api_key_prefix['apikey'] = 'Bearer'
44-
45-
# Configure API key authorization: X-Api-Key
46-
configuration.api_key['X-Api-Key'] = os.environ["API_KEY"]
47-
48-
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
49-
# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'
50-
51-
# Enter a context with an instance of the API client
52-
with sonarr.ApiClient(configuration) as api_client:
53-
# Create an instance of the API class
54-
api_instance = sonarr.StaticResourceApi(api_client)
55-
path = 'path_example' # str |
56-
57-
try:
58-
api_instance.get(path)
59-
except Exception as e:
60-
print("Exception when calling StaticResourceApi->get: %s\n" % e)
61-
```
62-
63-
64-
65-
### Parameters
66-
67-
68-
Name | Type | Description | Notes
69-
------------- | ------------- | ------------- | -------------
70-
**path** | **str**| |
71-
72-
### Return type
73-
74-
void (empty response body)
75-
76-
### Authorization
77-
78-
[apikey](../README.md#apikey), [X-Api-Key](../README.md#X-Api-Key)
79-
80-
### HTTP request headers
81-
82-
- **Content-Type**: Not defined
83-
- **Accept**: Not defined
84-
85-
### HTTP response details
86-
87-
| Status code | Description | Response headers |
88-
|-------------|-------------|------------------|
89-
**2XX** | OK | - |
90-
91-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
92-
9312
# **get_by_path**
9413
> get_by_path(path)
9514

sonarr/api/static_resource_api.py

Lines changed: 1 addition & 253 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from typing import Any, Dict, List, Optional, Tuple, Union
1717
from typing_extensions import Annotated
1818

19-
from pydantic import Field, StrictStr, field_validator
19+
from pydantic import Field, field_validator
2020
from typing_extensions import Annotated
2121

2222
from sonarr.api_client import ApiClient, RequestSerialized
@@ -37,258 +37,6 @@ def __init__(self, api_client=None) -> None:
3737
self.api_client = api_client
3838

3939

40-
@validate_call
41-
def get(
42-
self,
43-
path: StrictStr,
44-
_request_timeout: Union[
45-
None,
46-
Annotated[StrictFloat, Field(gt=0)],
47-
Tuple[
48-
Annotated[StrictFloat, Field(gt=0)],
49-
Annotated[StrictFloat, Field(gt=0)]
50-
]
51-
] = None,
52-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
53-
_content_type: Optional[StrictStr] = None,
54-
_headers: Optional[Dict[StrictStr, Any]] = None,
55-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56-
) -> None:
57-
"""get
58-
59-
60-
:param path: (required)
61-
:type path: str
62-
:param _request_timeout: timeout setting for this request. If one
63-
number provided, it will be total request
64-
timeout. It can also be a pair (tuple) of
65-
(connection, read) timeouts.
66-
:type _request_timeout: int, tuple(int, int), optional
67-
:param _request_auth: set to override the auth_settings for an a single
68-
request; this effectively ignores the
69-
authentication in the spec for a single request.
70-
:type _request_auth: dict, optional
71-
:param _content_type: force content-type for the request.
72-
:type _content_type: str, Optional
73-
:param _headers: set to override the headers for a single
74-
request; this effectively ignores the headers
75-
in the spec for a single request.
76-
:type _headers: dict, optional
77-
:param _host_index: set to override the host_index for a single
78-
request; this effectively ignores the host_index
79-
in the spec for a single request.
80-
:type _host_index: int, optional
81-
:return: Returns the result object.
82-
""" # noqa: E501
83-
84-
_param = self._get_serialize(
85-
path=path,
86-
_request_auth=_request_auth,
87-
_content_type=_content_type,
88-
_headers=_headers,
89-
_host_index=_host_index
90-
)
91-
92-
_response_types_map: Dict[str, Optional[str]] = {
93-
'2XX': None,
94-
}
95-
response_data = self.api_client.call_api(
96-
*_param,
97-
_request_timeout=_request_timeout
98-
)
99-
response_data.read()
100-
return self.api_client.response_deserialize(
101-
response_data=response_data,
102-
response_types_map=_response_types_map,
103-
).data
104-
105-
106-
@validate_call
107-
def get_with_http_info(
108-
self,
109-
path: StrictStr,
110-
_request_timeout: Union[
111-
None,
112-
Annotated[StrictFloat, Field(gt=0)],
113-
Tuple[
114-
Annotated[StrictFloat, Field(gt=0)],
115-
Annotated[StrictFloat, Field(gt=0)]
116-
]
117-
] = None,
118-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
119-
_content_type: Optional[StrictStr] = None,
120-
_headers: Optional[Dict[StrictStr, Any]] = None,
121-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
122-
) -> ApiResponse[None]:
123-
"""get
124-
125-
126-
:param path: (required)
127-
:type path: str
128-
:param _request_timeout: timeout setting for this request. If one
129-
number provided, it will be total request
130-
timeout. It can also be a pair (tuple) of
131-
(connection, read) timeouts.
132-
:type _request_timeout: int, tuple(int, int), optional
133-
:param _request_auth: set to override the auth_settings for an a single
134-
request; this effectively ignores the
135-
authentication in the spec for a single request.
136-
:type _request_auth: dict, optional
137-
:param _content_type: force content-type for the request.
138-
:type _content_type: str, Optional
139-
:param _headers: set to override the headers for a single
140-
request; this effectively ignores the headers
141-
in the spec for a single request.
142-
:type _headers: dict, optional
143-
:param _host_index: set to override the host_index for a single
144-
request; this effectively ignores the host_index
145-
in the spec for a single request.
146-
:type _host_index: int, optional
147-
:return: Returns the result object.
148-
""" # noqa: E501
149-
150-
_param = self._get_serialize(
151-
path=path,
152-
_request_auth=_request_auth,
153-
_content_type=_content_type,
154-
_headers=_headers,
155-
_host_index=_host_index
156-
)
157-
158-
_response_types_map: Dict[str, Optional[str]] = {
159-
'2XX': None,
160-
}
161-
response_data = self.api_client.call_api(
162-
*_param,
163-
_request_timeout=_request_timeout
164-
)
165-
response_data.read()
166-
return self.api_client.response_deserialize(
167-
response_data=response_data,
168-
response_types_map=_response_types_map,
169-
)
170-
171-
172-
@validate_call
173-
def get_without_preload_content(
174-
self,
175-
path: StrictStr,
176-
_request_timeout: Union[
177-
None,
178-
Annotated[StrictFloat, Field(gt=0)],
179-
Tuple[
180-
Annotated[StrictFloat, Field(gt=0)],
181-
Annotated[StrictFloat, Field(gt=0)]
182-
]
183-
] = None,
184-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
185-
_content_type: Optional[StrictStr] = None,
186-
_headers: Optional[Dict[StrictStr, Any]] = None,
187-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
188-
) -> RESTResponseType:
189-
"""get
190-
191-
192-
:param path: (required)
193-
:type path: str
194-
:param _request_timeout: timeout setting for this request. If one
195-
number provided, it will be total request
196-
timeout. It can also be a pair (tuple) of
197-
(connection, read) timeouts.
198-
:type _request_timeout: int, tuple(int, int), optional
199-
:param _request_auth: set to override the auth_settings for an a single
200-
request; this effectively ignores the
201-
authentication in the spec for a single request.
202-
:type _request_auth: dict, optional
203-
:param _content_type: force content-type for the request.
204-
:type _content_type: str, Optional
205-
:param _headers: set to override the headers for a single
206-
request; this effectively ignores the headers
207-
in the spec for a single request.
208-
:type _headers: dict, optional
209-
:param _host_index: set to override the host_index for a single
210-
request; this effectively ignores the host_index
211-
in the spec for a single request.
212-
:type _host_index: int, optional
213-
:return: Returns the result object.
214-
""" # noqa: E501
215-
216-
_param = self._get_serialize(
217-
path=path,
218-
_request_auth=_request_auth,
219-
_content_type=_content_type,
220-
_headers=_headers,
221-
_host_index=_host_index
222-
)
223-
224-
_response_types_map: Dict[str, Optional[str]] = {
225-
'2XX': None,
226-
}
227-
response_data = self.api_client.call_api(
228-
*_param,
229-
_request_timeout=_request_timeout
230-
)
231-
return response_data.response
232-
233-
234-
def _get_serialize(
235-
self,
236-
path,
237-
_request_auth,
238-
_content_type,
239-
_headers,
240-
_host_index,
241-
) -> RequestSerialized:
242-
243-
_host = None
244-
245-
_collection_formats: Dict[str, str] = {
246-
}
247-
248-
_path_params: Dict[str, str] = {}
249-
_query_params: List[Tuple[str, str]] = []
250-
_header_params: Dict[str, Optional[str]] = _headers or {}
251-
_form_params: List[Tuple[str, str]] = []
252-
_files: Dict[
253-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
254-
] = {}
255-
_body_params: Optional[bytes] = None
256-
257-
# process the path parameters
258-
if path is not None:
259-
_path_params['path'] = path
260-
# process the query parameters
261-
# process the header parameters
262-
# process the form parameters
263-
# process the body parameter
264-
265-
266-
267-
268-
# authentication setting
269-
_auth_settings: List[str] = [
270-
'apikey',
271-
'X-Api-Key'
272-
]
273-
274-
return self.api_client.param_serialize(
275-
method='GET',
276-
resource_path='/',
277-
path_params=_path_params,
278-
query_params=_query_params,
279-
header_params=_header_params,
280-
body=_body_params,
281-
post_params=_form_params,
282-
files=_files,
283-
auth_settings=_auth_settings,
284-
collection_formats=_collection_formats,
285-
_host=_host,
286-
_request_auth=_request_auth
287-
)
288-
289-
290-
291-
29240
@validate_call
29341
def get_by_path(
29442
self,

0 commit comments

Comments
 (0)