ephaptic 0.2.6__py3-none-any.whl → 0.2.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ephaptic/cli/__main__.py CHANGED
@@ -95,10 +95,11 @@ def generate(
95
95
 
96
96
  method_schema = {
97
97
  "args": {},
98
- "return": None
98
+ "return": None,
99
+ "required": [],
99
100
  }
100
101
 
101
- for param_name in sig.parameters:
102
+ for param_name, param in sig.parameters.items():
102
103
  hint = hints.get(param_name, typing.Any)
103
104
  adapter = TypeAdapter(hint)
104
105
 
@@ -107,6 +108,13 @@ def generate(
107
108
  schema_output["definitions"],
108
109
  )
109
110
 
111
+ if param.default == inspect.Parameter.empty:
112
+ method_schema["required"].append(param_name)
113
+ else:
114
+ method_schema["args"][param_name]["default"] = str(param.default)
115
+
116
+
117
+
110
118
  return_hint = hints.get("return", typing.Any)
111
119
  if return_hint is not type(None):
112
120
  adapter = TypeAdapter(return_hint)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ephaptic
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: The Python client/server package for ephaptic.
5
5
  Author-email: uukelele <robustrobot11@gmail.com>
6
6
  License: MIT License
@@ -5,15 +5,15 @@ ephaptic/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
5
5
  ephaptic/adapters/fastapi_.py,sha256=yfSbJuA7Tgeh9EhZkfIve0Uj-cOZmTBljlBsCRKh2EE,1007
6
6
  ephaptic/adapters/quart_.py,sha256=MBo9g6h_zI63mL4aGdrvV5yEXsHaOd0Iv5J8SAPHBoA,537
7
7
  ephaptic/cli/__init__.py,sha256=p_mYumuQLr3HZa-6I4QKut6khZv3WQjEX-B-aa4cdEE,44
8
- ephaptic/cli/__main__.py,sha256=jBFS6l6xJ1skKlvkw37n3oaCUMmvhKjn1yKMTWazc5g,4589
8
+ ephaptic/cli/__main__.py,sha256=MNzOfPK4DMwlnplJzT3NWBJdMnR0UFgcDl_8VvwO_QA,4866
9
9
  ephaptic/client/__init__.py,sha256=NeaPIzTFeozP54wlDYHIg_adHP3Z3LWVujsRUlpn4_U,35
10
10
  ephaptic/client/client.py,sha256=YYAlzA40xBvWsiDu0Gsd1EBJaqivLR-bSszepWdNODs,4181
11
11
  ephaptic/transports/__init__.py,sha256=kSAlgvm8sV9nHHu61LTjjTpv4bweah90xvFrwQMDQtQ,169
12
12
  ephaptic/transports/fastapi_ws.py,sha256=X0PMRcwM-KDpKA-zXShGTFhD1kHMSqrx3PBBKZtQ1W0,258
13
13
  ephaptic/transports/websocket.py,sha256=jwgclSDSq0lQCvgwjwUXe9MzPk7NH0FdmsLhWxYBh-4,261
14
- ephaptic-0.2.6.dist-info/licenses/LICENSE,sha256=kMpJjLKMj6zsAhf4uHApO4q0r31Ye1VyfBOl9cFW13M,1065
15
- ephaptic-0.2.6.dist-info/METADATA,sha256=s7vEc7TfL7wjn4geyzgkpqtYLxh4hG0Bryemfqgmu7M,8533
16
- ephaptic-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- ephaptic-0.2.6.dist-info/entry_points.txt,sha256=lis9vIDIrMVJM43r9ooFkb07KhrX4946duvYru3VfT4,46
18
- ephaptic-0.2.6.dist-info/top_level.txt,sha256=nNhdhcz2o_IuwZ9I2uWQuLZrRmSW0dQVU3qwGrb35Io,9
19
- ephaptic-0.2.6.dist-info/RECORD,,
14
+ ephaptic-0.2.7.dist-info/licenses/LICENSE,sha256=kMpJjLKMj6zsAhf4uHApO4q0r31Ye1VyfBOl9cFW13M,1065
15
+ ephaptic-0.2.7.dist-info/METADATA,sha256=ej7C_HcS0ONyL_bs85XZjl8yu7egeNya-Q7DeTbqMS4,8533
16
+ ephaptic-0.2.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ ephaptic-0.2.7.dist-info/entry_points.txt,sha256=lis9vIDIrMVJM43r9ooFkb07KhrX4946duvYru3VfT4,46
18
+ ephaptic-0.2.7.dist-info/top_level.txt,sha256=nNhdhcz2o_IuwZ9I2uWQuLZrRmSW0dQVU3qwGrb35Io,9
19
+ ephaptic-0.2.7.dist-info/RECORD,,