-
Notifications
You must be signed in to change notification settings - Fork 5
Refactoring and adds SQL Schema #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
idShort VARCHAR(128), | ||
) |
There was a problem hiding this comment.
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.
idShort VARCHAR(128), | |
) | |
idShort VARCHAR(128) | |
); |
Copilot uses AI. Check for mistakes.
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>
No description provided.