Skip to content

Commit daa0972

Browse files
committed
chore: REST skips non-analysis ops via descriptor kind (phase 6b)
Generalizes the producer skip to kind != 'operation' (producers + transformers), read from the generated method's _facade_kind tag.
1 parent 859a07d commit daa0972

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

flamapy/interfaces/rest/operations_routes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ def route_function() -> Any:
254254
for name, method in inspect.getmembers(FLAMAFeatureModel, predicate=inspect.isfunction):
255255
if name.startswith('_'):
256256
continue
257-
if isinstance(inspect.getattr_static(FLAMAFeatureModel, name), staticmethod):
258-
continue # producer ops (model generators) need no model; Python-API only for now
257+
if getattr(method, '_facade_kind', 'operation') != 'operation':
258+
continue # producers/transformers return models; Python-API only for now
259259
docstring = extract_docstring_with_swagger_info(method)
260260
limit = expensive_operation_limit if name in _EXPENSIVE_OPERATIONS else default_operation_limit
261261
route_view = limiter.limit(limit)(create_route(name, docstring))

0 commit comments

Comments
 (0)