Add new controllers to custom apismaster#186
Open
eduardocordova21 wants to merge 9 commits into
Open
Conversation
Reorganized imports, included PhasorWebUI namespaces, and improved comments. The AuthenticationOptions property was moved to the beginning of the class with documentation. Added instances of the DeviceController, PhasorController, and DevicePhasorController controllers. Adjusted formatting, removed duplicates, and improved organization of static members.
Includes DeviceController, PhasorController, and DevicePhasorController for querying devices (PMUs), phasors, and their relationships, with endpoints for filters and CSV export. Adds StringConstant.cs to standardize field names. Updates the project to include the new files and implements structured logging in all controllers.
Includes the DeviceWithPhasors class as a DTO to represent a Device (PMU) with its list of associated Phasors. Adds the new DeviceWithPhasors.cs file to the openPDC.Model.csproj project.
Comments for the DeviceWithPhasors class have been translated from Portuguese to English, improving documentation and making it easier to understand for international developers.
The driver's XML comment has been reformatted for better readability. In the GetDeviceWithPhasorsByAcronym method, the phasor query has been simplified by removing sorting, limit, and offset parameters, using only the acronym filter.
…thub.com/eduardocordova21/openPDC into add-new-controllers-to-custom-apismaster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new API controller for device operations and makes supporting changes to enable and register this controller in the openPDC application. The most significant update is the addition of the
DeviceController,PhasorControllerandDevicePhasorController, which provides REST API endpoints for querying device information. Supporting changes include registering the new controller in the web application startup and introducing a constants class for string values used in the adapter layer.New API Functionality
DeviceController,DevicePhasorControllerandPhasorControllerclasses inopenPDC.Adaptersthat exposes several REST API endpoints for querying device data, such as retrieving all devices, querying by acronym, company, protocol, and enabled status. The controller includes logging and error handling for each endpoint.StringConstantinopenPDC.Adapters.Constantsto centralize string constants used throughout the adapter and controller code.Application Startup and Registration
DeviceController,DevicePhasorControllerandPhasorControllerin the web API configuration withinStartup.cs, ensuring its endpoints are available as part of the application's API surface.usingstatements inStartup.csfor clarity and to include necessary namespaces for the new controller and API functionality. [1] [2]Code Quality and Maintenance
Startup.csfor better readability, especially around JSON serialization settings, CORS policy, and assembly loading. [1] [2] [3]AuthenticationOptionsproperty to the top of theStartupclass for better organization. [1] [2]