Skip to content

Conversation

FriedJannik
Copy link
Member

No description provided.

@FriedJannik FriedJannik requested a review from Copilot October 6, 2025 11:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the codebase by extracting common configuration, database initialization, and server setup logic into a shared internal/common package. The refactoring improves code reusability and eliminates duplication across services.

  • Extracted configuration structures and utilities to a common package
  • Created shared database initialization logic with parameterized schema files
  • Added common server setup functions for health endpoints and CORS configuration

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
internal/common/configuration.go New shared configuration structures and utilities for loading/printing config
internal/common/database.go New shared database initialization function with parameterized schema support
internal/common/endpoints.go New shared health endpoint configuration
cmd/submodelrepositoryservice/main.go Refactored to use common configuration and utilities, removed duplicated code
internal/submodelrepository/persistence/PostgreSQLSubmodelDatabase.go Updated to use shared database initialization
cmd/aasregistryservice/resources/sql/registryschema.sql New SQL schema file for AAS registry service
api/discovery/openapi.yaml New OpenAPI specification for discovery service

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 53 to 54
idShort VARCHAR(128),
)
Copy link
Preview

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after the closing parenthesis of submodel_descriptor table definition.

Suggested change
idShort VARCHAR(128),
)
idShort VARCHAR(128)
);

Copilot uses AI. Check for mistakes.

FriedJannik and others added 13 commits October 6, 2025 13:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

1 participant