Skip to content

server/app/interfaces: update AAS- and SubmodelRepository API to V3.1#421

Draft
Frosty2500 wants to merge 7 commits intoeclipse-basyx:developfrom
rwth-iat:update/api_V3.1
Draft

server/app/interfaces: update AAS- and SubmodelRepository API to V3.1#421
Frosty2500 wants to merge 7 commits intoeclipse-basyx:developfrom
rwth-iat:update/api_V3.1

Conversation

@Frosty2500
Copy link
Copy Markdown
Contributor

This PR updates the AAS- and SubmodelRepository servers from version 3.01 to version 3.1 and fixes some bugs.

@s-heppner s-heppner marked this pull request as draft October 15, 2025 08:28
@s-heppner
Copy link
Copy Markdown
Member

We need to wait with merging this PR until we release v2.0.0.

@s-heppner
Copy link
Copy Markdown
Member

s-heppner commented Apr 23, 2026

I've updated this branch, the merge conflicts were quite complex due to the refactoring we did while this PR was already out.

Currently, there's a typing issue:

    @classmethod
    def _get_slice(cls, request: Request, iterator: Iterable[T]) -> Tuple[Iterator[T], int]:
        limit_str = request.args.get('limit', default="10")
        cursor_str = request.args.get('cursor', default="1")
        try:
            limit, cursor = int(limit_str), int(cursor_str) - 1  # cursor is 1-indexed
            if limit < 0 or cursor < 0:
                raise ValueError
        except ValueError:
            raise BadRequest("Limit can not be negative, cursor must be positive!")
        start_index = cursor
        end_index = cursor + limit
        items = list(itertools.islice(iterator, start_index, end_index + 1))
        has_more = len(items) > limit
        paginated_slice = iter(items[:limit])
        next_cursor = cursor + limit if has_more else None
        return paginated_slice, next_cursor

As it is implemented, it actually returns Optional[int] with next_cursor.
However, the endpoints that use this method do expect int.
Someone more experienced with the API spec should investigate how this method is supposed to behave and what we need to adapt.

Furthermore, @moritzsommer, could you review the repository.py file w.r.t. the ObjectStore refactor please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants