Skip to content

Commit

Permalink
Reflect standardized service profiles (fixes #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
otto-ifak committed Apr 18, 2024
1 parent 206e22f commit 5f63ab1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 251 deletions.
3 changes: 1 addition & 2 deletions aas_test_engines/_api/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def from_dict(cls: "Operation", method: str, data: Any, json_path: str, resolver
request_body, json_path + '.' + 'requestBody') if request_body is not None else None,
responses=[Response.from_dict(k, v, json_path + '.' + k)
for k, v in safe_dict_lookup(data, 'responses', dict, json_path).items()],
tags=set(safe_dict_lookup(data, 'tags', list, json_path))
tags=set(safe_dict_lookup(data, 'tags', list, json_path, []))
)

def get_param_by_name(self, name: str) -> Parameter:
Expand Down Expand Up @@ -213,7 +213,6 @@ def from_dict(cls: "OpenApi", data: Any) -> "OpenApi":
paths=[
Path.from_dict(path_name, path_info, 'paths.' + path_name, resolver)
for path_name, path_info in safe_dict_lookup(data, 'paths', dict, '').items()
if not path_name.startswith('/packages') # TODO: remove this
],
components=safe_dict_lookup(data, 'components', dict, ''),
)
Expand Down
2 changes: 1 addition & 1 deletion aas_test_engines/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def generate_tests(version: str = _DEFAULT_VERSION, suites: Set[str] = None) ->
if suites is None:
suites = spec.tags
if not spec.tags.issuperset(suites):
raise AasTestToolsException(f"Unknown suites {suites}, must be in {spec.tags}")
raise AasTestToolsException(f"Unknown suites {suites}, must be in {sorted(spec.tags)}")
conf = generate.generate(spec.api, suites)
return conf

Expand Down
Loading

0 comments on commit 5f63ab1

Please sign in to comment.