Coverage for src/configuration/openapi_spec_entity_collection.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-03-24 21:46 -0400

1"""Module for OpenAPISpecEntityCollection""" 

2 

3from sqlalchemy.orm import scoped_session 

4 

5from common.models.openapi_entity import OpenAPIEntity 

6from common.models.openapi_operation import OpenAPIOperation 

7from common.models.openapi_path import OpenAPIPath 

8from common.models.openapi_server import OpenAPIServer 

9 

10 

11# pylint: disable-next=too-few-public-methods 

12class OpenAPISpecEntityCollection: 

13 """A collection of all OpenAPI SQLAlchemy model objects associated with 

14 one OpenAPI specification, as parsed by @class OpenAPIObject""" 

15 

16 oa_servers: list[OpenAPIServer] = [] 

17 oa_entities: list[OpenAPIEntity] = [] 

18 oa_operations: list[OpenAPIOperation] = [] 

19 oa_paths: list[OpenAPIPath] = [] 

20 

21 def session_add(self, session: scoped_session): 

22 """Add all entities to the passed database session""" 

23 # TODO: implement OpenAPISpecEntityCollection.session_add() # pylint: disable=fixme