-
Notifications
You must be signed in to change notification settings - Fork 26
Traits v2_1: rebase main #165
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
Merged
Merged
Changes from all commits
Commits
Show all changes
253 commits
Select commit
Hold shift + click to select a range
fc0657e
linting
tommymalmqvist 8d8193a
feat: Enhance BootNotification message for OCPP v2.1
tommymalmqvist 08bd391
feat: Add GenericStatusEnumType for OCPP v2.1
tommymalmqvist f8ab372
feat: Add HashAlgorithmEnumType for OCPP v2.1
tommymalmqvist aa67286
feat: Add AuthorizationStatusEnumType for OCPP v2.1
tommymalmqvist 2a878cc
feat: Add CertificateSigningUseEnumType for OCPP v2.1
tommymalmqvist 6d6e993
feat: Add OperationalStatusEnumType for OCPP v2.1
tommymalmqvist e639dc3
Add ChangeAvailabilityStatusEnumType
tommymalmqvist fa0cc62
feat: Add DayOfWeekEnumType for OCPP v2.1
tommymalmqvist 3d0c70b
feat: Add EvseKindEnumType for OCPP v2.1
tommymalmqvist 7d2d376
Added MessageFormatEnumType
tommymalmqvist 3961d11
feat: Add ChargingStateEnumType for OCPP v2.1
tommymalmqvist 9aad755
feat: Add APNAuthenticationEnumType for OCPP v2.1
tommymalmqvist 7496bfc
feat: Add ChargingRateUnitEnumType for OCPP v2.1
tommymalmqvist 3047f64
feat: Add ConnectorStatusEnumType for OCPP v2.1
tommymalmqvist b41a063
feat: Add ResetStatusEnumType for OCPP v2.1
tommymalmqvist 77de21e
feat: Add GetCertificateStatusEnumType for OCPP v2.1
tommymalmqvist 820ebde
feat: Add MessageTriggerEnumType for OCPP v2.1
tommymalmqvist 0cef25d
feat: Add OCPPInterfaceEnumType for OCPP v2.1
tommymalmqvist 44a3911
feat: Add OCPPTransportEnumType for OCPP v2.1
tommymalmqvist e3ad975
feat: Add OCPPVersionEnumType for OCPP v2.1
tommymalmqvist a3339a1
feat: Add VPNEnumType for OCPP v2.1
tommymalmqvist fe1d65d
feat: Add DERControlEnumType for OCPP v2.1
tommymalmqvist 6134684
feat: Add EventNotificationEnumType for OCPP v2.1
tommymalmqvist 2aed6b2
feat: Add ChargingProfilePurposeEnumType for OCPP v2.1
tommymalmqvist c9d3fbc
feat: Add ChargingLimitSourceEnumType for OCPP v2.1
tommymalmqvist 5e82285
feat: Add ChargingProfileKindEnumType for OCPP v2.1
tommymalmqvist d842732
feat: Add ChargingProfileStatusEnumType for OCPP v2.1
tommymalmqvist 26262a0
feat: Add OperationModeEnumType for OCPP v2.1
tommymalmqvist a3696b9
feat: Add ChargingProfileKindEnumType and ChargingProfileStatusEnumTy…
tommymalmqvist 74d38a0
feat: Add StatusInfoType for OCPP v2.1 status information
tommymalmqvist dd3834a
feat: Add AdditionalInfoType, CustomDataType, and IdTokenType for OCP…
tommymalmqvist 3ae8af7
feat: Add Variable and Certificate-related Types for OCPP v2.1
tommymalmqvist c795ad5
feat: Add CancelReservation message types and status enumeration for …
tommymalmqvist 4e7f3f7
feat: Add CertificateSigned message types for OCPP v2.1
tommymalmqvist 965ab95
refactor: Consolidate Authorize and CertificateSigned message types
tommymalmqvist f85cbe3
Add enums
tommymalmqvist 0167b94
Add grid_even_fault
tommymalmqvist 317c98f
Fix imports
tommymalmqvist 95c75c9
Add more types
tommymalmqvist 3d9c1f9
refactor: Improve IslandingDetectionEnumType serialization and naming
tommymalmqvist 22f4a4a
refactor: Remove Hash trait from ChargingScheduleUpdateType
tommymalmqvist 276222b
refactor: Update SalesTariffEntryType validation for e_price_level
tommymalmqvist 10fd4df
feat: Enhance IdTokenType validation and schema for OCPP v2.1
tommymalmqvist cb84a5a
Add message types
tommymalmqvist 64e2891
Minor fixes
tommymalmqvist 6902ad3
feat: Add OCPP 2.1 support and enhance schema validation
tommymalmqvist 1ded1b2
Fix imports
tommymalmqvist 9a75bfc
feat: Enhance CustomDataType with additional properties support
tommymalmqvist 6ebea65
refactor: Cleanup and simplify message module imports
tommymalmqvist 038fce2
Update tests
tommymalmqvist 2fcbc04
refactor: Enhance ChargingLimitSourceEnumType for OCPP 2.1 flexibility
tommymalmqvist 391fb4d
feat: Add comprehensive ConnectorEnumType for OCPP 2.1 connector types
tommymalmqvist 2d57955
feat: Add SigningMethodEnumType for OCPP 2.1 signing methods
tommymalmqvist 2e7cc21
refactor: Update SignedMeterValueType with improved signing method an…
tommymalmqvist 5fbca04
add v2.1 doc (#163)
AnlangA b221812
Fix imports
tommymalmqvist 5e788b3
feat: add absolute_price_schedule.rs trait
4284f06
feat: add ac_charging_parameters.rs trait
e281f9b
feat: Add validation and methods to AdditionalInfoType
e1e0b08
feat: Add validation and methods to AdditionalSelectedServicesType
f3d86c5
feat(address): add validation and methods to AddressType
113636f
feat(apn): add APNType constructor and methods for chaining
ea4c7f8
feat(authorization_data): enhance AuthorizationData with methods and …
3f58349
feat(battery_data): enhance BatteryDataType with detailed docs and me…
45b00fd
feat: Add validation and methods to CertificateHashDataChainType
255f02b
refactor(v2_1/datatypes): Remove Validate derive from multiple structs
f268492
feat(v2_1/datatypes): enhance CertificateStatusType with methods and …
c674fc8
feat: enhance CertificateStatusRequestInfoType with new methods and t…
2a8e217
feat(charging_limit): Add methods and tests for ChargingLimitType
06408a7
feat: Add builder methods and tests for ChargingNeedsType and DCCharg…
1f55fb2
feat: Add methods and tests for ChargingPeriodType and CostDimensionType
9b566bc
feat(charging_profile): add new methods and tests for ChargingProfile…
69a54ed
feat(charging_schedule): add builder methods and tests for ChargingSc…
b29d3da
feat(charging_schedule_period): add methods for creating and modifyin…
e7181bd
feat: Add builder methods and tests for ChargingProfileCriterion and …
1e0a9d5
feat(charging_station): add methods and tests for ChargingStationType
ca1ea35
feat(modem): add ModemType methods and tests
e0cfced
feat: Add methods to ClearChargingProfileType for easier configuratio…
5dbd753
feat: enhance ComponentType and ComponentVariableType with additional…
548e7ac
feat(variable): add methods and tests for VariableType
e63cfe7
feat(v2_1): add builder methods and tests for data types
9abe3c3
feat(cost_details): add new methods and tests for CostDetailsType
8aee944
format: cargo fmt
e769ce4
feat: add builder methods and tests for ClearMonitoringResultType, Cl…
cb2f166
feat: Add constructors and methods to DER data types for easier insta…
94e04a9
feat(v2_1): add default feature and enhance DER data types
f689b64
feat(freq_droop): add constructor and methods for FreqDroopType and F…
8abde38
feat: Add constructors and methods to EV price schedule types
05a256e
feat: Add builder methods and tests for EV energy offer and related t…
4a710cb
feat(v2_1/datatypes): Add builder methods and tests for GetVariableDa…
fbdc05e
feat(v2_1/datatypes): Add builder methods and tests for IdTokenInfoType
7de72eb
feat(v2_1/datatypes): Implement builder methods and tests for IdToken…
761a9a3
feat(v2_1/datatypes): Add constructors and methods for LimitAtSoCType…
632bb14
feat(v2_1/datatypes): Add constructors and builder methods for Tariff…
39b2ff4
feat(v2_1/datatypes): Add constructors and methods for V2XChargingPar…
7b103be
feat(v2_1/datatypes): Add constructors and methods for TariffEnergyTy…
23a3d42
feat(v2_1/datatypes): Implement methods for TaxRuleType including con…
09cd652
feat: Enhance transaction and variable data types with new methods an…
2ea1aa0
feat(v2_1/datatypes): Add constructors and methods for GetVariableRes…
fdf0012
feat(v2_1/datatypes): Update tests to use new_without_severity method…
0ba8509
Implement new data types and methods for monitoring and variable mana…
3b5c1dc
feat: Add PriceRuleType and PriceRuleStackType with custom data support
5073c04
Refactor code for improved readability and consistency across multipl…
e05f29b
feat(v2_1/datatypes): Add constructors and methods for SetVariableRes…
971977f
feat(v2_1/messages): add camelCase renaming to priority charging and …
752ff6f
refactor(v2_1): Update AbsolutePriceScheduleType to use DateTime<Utc>
58b6c6e
docs: Fix punctuation in README.md usage section
9ef7b37
refactor: Switch ACChargingParametersType to use Decimal for precision
483e269
feat(v2_1): enhance AbsolutePriceScheduleType with validation and new…
850b15e
feat: Add validation to AdditionalSelectedServicesType
9bfba3a
refactor: relax length validation for additional_id_token and type_
6960f7b
feat: Add validation to AddressType fields and implement unit tests
AnlangA 9c04d82
refactor(APNType): move custom_data field to end of struct
2ffb38c
feat: add nested validation to data types and enhance tests
59ca3c8
feat(battery_data): enhance battery data model with validation and ne…
d7d330b
feat: Add validation to CertificateHashDataChainType
AnlangA 3dc1603
feat: Add URL validation and tests to CertificateStatusRequestInfoType
AnlangA 759dc12
feat: Add validation and improve CertificateStatusType
AnlangA 4eb8ffe
feat(v2_1): Add validation and enhance ChargingLimitType and Charging…
AnlangA 17375db
feat(v2_1/datatypes): add validation and optional fields to ChargingP…
AnlangA 40bdc10
feat(v2_1): Add charging limit source to ChargingProfileCriterionType
AnlangA bcc2486
refactor(v2_1/datatypes): Update serialization and validation for Cha…
AnlangA 8db4733
refactor: update ChargingSchedulePeriodType with new fields and valid…
AnlangA 704597d
refactor(v2_1/datatypes): Simplify ChargingScheduleType and ChargingS…
AnlangA a6dc957
refactor(v2_1/datatypes): Reorganize custom_data fields and add tests
AnlangA 4b0951e
refactor(v2_1/datatypes): Move custom_data field in ClearMonitoringRe…
AnlangA b9263a6
refactor(ClearTariffsResultType): Move custom_data field and add tests
AnlangA b45f484
feat(v2_1): add validation and tests for ComponentType and ComponentV…
AnlangA d41ae23
Add validation to params field and comprehensive tests
AnlangA 480a9c4
refactor:Set v2_1 as default feature and enhance ConsumptionCostType
AnlangA 3d5b705
Merge branch 'traits_v2_1' of https://github.com/AnlangA/rust-ocpp in…
AnlangA 430e8eb
Reorder fields and add validation tests for CompositeScheduleType
AnlangA 960d8fb
Add validation to custom_data field in ConstantStreamDataType
AnlangA b179b99
Add detailed validation test error messages and custom data tests
AnlangA 291d5f7
Add detailed test assertions with error messages
AnlangA 68efd18
Make charging_periods optional with validation
AnlangA d68d65b
refactor(v2_1/datatypes): Use Decimal for volume in CostDimensionType
AnlangA 3cb1626
feat(DCChargingParametersType): Add SoC, full SoC, and use Decimal fo…
AnlangA 45726e5
feat(DERChargingParametersType): Add comprehensive DER charging param…
AnlangA eeda5b5
refactor(v2_1): add arbitrary precision to Decimal fields in DERCharg…
AnlangA c365cbe
refactor(v2_1/datatypes): Update serialization and deserialization te…
AnlangA fb42c31
refactor(DERCurveGetType): Move custom_data field and add validation …
4dedd1f
refactor: switch DERCurvePointsType to use Decimal for precision
59169a8
refactor(v2_1/datatypes/der_curve): Use rust_decimal for precision in…
73a15d5
feat(v2_1/datatypes): add validation and tests for EnterServiceGetType
67db9c5
refactor(enter_service): Use Decimal for precision in EnterServiceType
afc0401
feat: add price rules to EVAbsolutePriceScheduleEntryType
3eaeb89
feat(ev_absolute_price_schedule): add default, display, and JSON conv…
90b702a
refactor(EVPowerScheduleEntryType): use Decimal for power and add val…
e9790e0
refactor(v2_1/datatypes): Use Decimal for precision in EV data types
AnlangA 22460b6
refactor: Update data types to use Decimal for precision and add vali…
AnlangA a815725
refactor(v2_1/datatypes): Update FixedPFType to use Decimal for preci…
AnlangA 2db8481
refactor(charging_needs): add nested validation to available_energy_t…
AnlangA c0029db
Merge branch 'traits_v2_1' of https://github.com/AnlangA/rust-ocpp in…
AnlangA b49e3dc
feat(v2_1/datatypes): Add is_default field to FixedVarGetType
AnlangA 2252167
refactor(v2_1/datatypes): Add skip_serializing_if and default to Deci…
AnlangA 259a4a1
refactor(fixed_pf): Remove redundant serde skip_serializing_if attribute
AnlangA 616717c
Update dependencies and fix Cargo.lock
AnlangA 369ecff
style: Fix serde attribute formatting in FixedVarType
AnlangA 6ee24db
feat(freq_droop_get): add is_default field and display, from impl
AnlangA fb72b2c
feat(freq_droop): enhance frequency droop settings with new fields an…
AnlangA 5aa3652
Change attribute_type to use AttributeEnumType
AnlangA 6012ca6
Update Cargo.toml
AnlangA cdd8524
Merge branch 'traits_v2_1' of https://github.com/AnlangA/rust-ocpp in…
AnlangA 810ea56
Remove default v2_1 feature to require explicit version
AnlangA e05a451
refactor(v2_1/datatypes): Add nested validation to GetVariableDataTyp…
AnlangA 8b728db
refactor(GetVariableResultType): enhance structure and validation
AnlangA d296337
feat(gradient): add soft gradient and use Decimal for rates
AnlangA 04b4769
refactor(v2_1/datatypes): Remove is_superseded from GradientGetType
AnlangA 3f531fe
feat(hysteresis): add hysteresis high/low/delay/gradient fields
AnlangA ae4530d
refactor(v2_1/datatypes): Simplify IdTokenInfoType creation and usage…
AnlangA d183692
refactor(id_token): Rename 'type' to 'type_' in IdTokenType
AnlangA 4d276b8
refactor(v2_1/datatypes): Update LimitAtSoCType to use Decimal for po…
AnlangA 23427f3
refactor(id_token_info): simplify and enhance IdTokenInfoType initial…
AnlangA 326805a
feat(id_token): add additional_info method and validation tests
AnlangA 53f5f69
feat(v2_1/datatypes): Add is_default field to LimitMaxDischargeGetType
AnlangA e354d5f
Merge remote-tracking branch 'origin/traits_v2_1' into traits_v2_1
AnlangA 5796e23
feat(v2_1/datatypes): enhance LimitMaxDischargeType with new fields a…
AnlangA 5954b1c
refactor(v2_1/datatypes): Remove redundant parameter from LimitMaxDis…
AnlangA d82cf8d
refactor(v2_1/datatypes): Remove discharge_limit from LimitMaxDischar…
AnlangA 147f979
feat(log_parameters): enhance LogParametersType with validation and d…
AnlangA b317053
feat(message_content): enhance MessageContentType with builder and va…
AnlangA 1ee12ca
feat(message_info): enhance MessageInfoType with new fields and valid…
AnlangA b65347d
feat(meter_value): enhance MeterValueType with detailed docs and vali…
AnlangA 9977ba5
feat(modem): enhance validation and method chaining in ModemType
AnlangA 2ab9262
refactor(monitoring_data): enhance validation and method chaining cla…
AnlangA e3e309c
refactor(NetworkConnectionProfileType): update fields and methods for…
AnlangA 69fdcf0
refactor(ocsp_request_data): enhance OCSP request data structure and …
AnlangA 351bfeb
feat(overstay_rule_list): add power and time thresholds, update valid…
AnlangA 00df778
feat(overstay_rule): enhance overstay rule with new fields and methods
AnlangA 9cab2b7
refactor(v2_1/datatypes): Update ConstantStreamData tests for new param
AnlangA 16f339d
feat: Add interval and values to PeriodicEventStreamParamsType
AnlangA 7f7b379
feat(periodic_event_stream_params): add validation to custom_data
AnlangA a838c52
feat(price_level_schedule): add new fields and methods to PriceLevelS…
AnlangA a91f899
Update price level range and description in schedule entry
AnlangA 73fd0ad
feat(v2_1/datatypes): Add placeholders and validate price rule stack
AnlangA ed916fb
refactor(v2_1/datatypes): Simplify PriceRuleType creation in tests
AnlangA 03e70dd
refactor(v2_1/datatypes): Use RationalNumberType in ChargingSchedule …
AnlangA f5b0770
refactor(price_rule_stack): use RationalNumberType in tests
AnlangA 2e41311
refactor(price_rule): update PriceRuleType to use RationalNumberType …
AnlangA 14c75b0
refactor(price_rule): restructure PriceRuleType, add validation and c…
AnlangA 8a5013a
refactor(price): switch to rust_decimal for price fields
AnlangA e27bb6c
refactor(v2_1/datatypes): Use Decimal for PriceType in tests
AnlangA 0ba9abe
feat: enhance reactive power params and add tests for rational number
AnlangA 1fe5201
refactor(v2_1/datatypes): Move custom_data field in RelativeTimeInter…
AnlangA 393cd47
Reformat imports with consistent ordering and grouping
AnlangA 8090a93
refactor(v2_1/datatypes): Use Decimal for precision in charging param…
AnlangA 67ceba6
refactor(v2_1/datatypes): Format and optimize code for readability an…
AnlangA ccade29
refactor(report_data): add validation and reorder fields in ReportDat…
AnlangA 1ea7a5f
feat(sales_tariff): enhance validation and structure in sales tariff …
AnlangA bf68d30
Change SalesTariff ID from string to integer and improve docs
AnlangA 21c090b
Refactor SetMonitoringDataType to use new schema
AnlangA 37ce573
Add monitor type and severity to SetMonitoringResultType
AnlangA ead05c6
Fix code formatting and trailing newlines
AnlangA fc7bff0
Refactor variable monitoring functionality
AnlangA a8a0a2d
Format code with consistent spacing and line breaks
AnlangA 19703a3
Refactor SetVariableResult with improved field organization
AnlangA c60ebd3
Refactor SignedMeterValueType to align with OCPP spec
AnlangA 71529e0
Update string length limits and refactor StreamDataElementType
AnlangA b05d12f
Fix code formatting in StreamDataElementType and tests
AnlangA 3165bb2
Redesign TariffType to better model EV charging price structures
AnlangA 706be5c
Refactor TariffAssignmentType to use DateTime<Utc> and improve naming
AnlangA af1c0bd
Reimplement TariffConditionsType to use V2.1 spec
AnlangA 828c065
Improve code formatting in test assertions
AnlangA bc6839a
Refactor TariffConditionsFixedType with multiple condition fields
AnlangA b391787
Update TariffEnergyType to support multiple price elements
AnlangA 6c2eb09
Refactor TariffEnergyPriceType with price_kwh and conditions
AnlangA 9d99553
Add trailing newline in tariff_energy_price.rs
AnlangA 72274e0
Refactor TariffFixedPriceType with price_fixed field
AnlangA 31928d2
Fix code formatting in tariff tests
AnlangA 4a521a7
Update TariffTimeType to support multiple price elements
AnlangA dc0bea0
refactor: replace f64 with Decimal for precision in pricing and condi…
AnlangA 937c06a
Improve tariff module with accurate descriptions and slices
AnlangA df6779c
Update tax_rule and total_cost to match ISO 15118-20 spec
AnlangA e1dcfeb
Update price and usage fields to match OCPP 2.1 spec
AnlangA 566e063
Replace float values with Decimal in TotalPrice and TotalUsage
AnlangA 7ac7949
Enhance TotalUsageType with f64 constructor and validation
AnlangA 7295c14
Refactor transaction datatype to match OCPP specification
AnlangA 8b5aedb
Fix UnitOfMeasureType implementation and constructor usage
AnlangA 02b62c6
Refactor V2XFreqWattPointType to use Decimal instead of f64
AnlangA ba463c7
Change V2XSignalWattPoint signal from f64 to i32
AnlangA 409da92
Update VariableType to make instance field optional
AnlangA 9fa2b64
Refactor VariableAttributeType to use enumerated attributes
AnlangA 120088b
Update VariableMonitoringType with required fields
AnlangA 7d48af4
Add v2_ feature that includes v2_0_1 and v2_1
AnlangA 9e18255
Format code blocks with multiline assertions
AnlangA 2908f80
Fix VPN import ordering in network_connection_profile tests
AnlangA 8ad739d
Reorder imports and format code
AnlangA f782b78
fix: make data_enum.rs
AnlangA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ pub mod tests; | |
pub mod v1_6; | ||
#[cfg(feature = "v2_0_1")] | ||
pub mod v2_0_1; | ||
#[cfg(feature = "v2_1")] | ||
pub mod v2_1; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
mod v1_6; | ||
#[cfg(all(test, feature = "v2_0_1"))] | ||
mod v2_0_1; | ||
#[cfg(all(test, feature = "v2_1"))] | ||
mod v2_1; |
41 changes: 41 additions & 0 deletions
41
src/tests/schema_validation/schemas/v2.1/AFRRSignalRequest.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"$id": "urn:OCPP:Cp:2:2025:1:AFRRSignalRequest", | ||
"comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License", | ||
"definitions": { | ||
"CustomDataType": { | ||
"description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", | ||
"javaType": "CustomData", | ||
"type": "object", | ||
"properties": { | ||
"vendorId": { | ||
"type": "string", | ||
"maxLength": 255 | ||
} | ||
}, | ||
"required": [ | ||
"vendorId" | ||
] | ||
} | ||
}, | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"timestamp": { | ||
"description": "Time when signal becomes active.\r\n", | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"signal": { | ||
"description": "Value of signal in _v2xSignalWattCurve_. \r\n", | ||
"type": "integer" | ||
}, | ||
"customData": { | ||
"$ref": "#/definitions/CustomDataType" | ||
} | ||
}, | ||
"required": [ | ||
"timestamp", | ||
"signal" | ||
] | ||
} |
70 changes: 70 additions & 0 deletions
70
src/tests/schema_validation/schemas/v2.1/AFRRSignalResponse.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"$id": "urn:OCPP:Cp:2:2025:1:AFRRSignalResponse", | ||
"comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License", | ||
"definitions": { | ||
"GenericStatusEnumType": { | ||
"javaType": "GenericStatusEnum", | ||
"type": "string", | ||
"additionalProperties": false, | ||
"enum": [ | ||
"Accepted", | ||
"Rejected" | ||
] | ||
}, | ||
"StatusInfoType": { | ||
"description": "Element providing more information about the status.\r\n", | ||
"javaType": "StatusInfo", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"reasonCode": { | ||
"description": "A predefined code for the reason why the status is returned in this response. The string is case-insensitive.\r\n", | ||
"type": "string", | ||
"maxLength": 20 | ||
}, | ||
"additionalInfo": { | ||
"description": "Additional text to provide detailed information.\r\n", | ||
"type": "string", | ||
"maxLength": 1024 | ||
}, | ||
"customData": { | ||
"$ref": "#/definitions/CustomDataType" | ||
} | ||
}, | ||
"required": [ | ||
"reasonCode" | ||
] | ||
}, | ||
"CustomDataType": { | ||
"description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", | ||
"javaType": "CustomData", | ||
"type": "object", | ||
"properties": { | ||
"vendorId": { | ||
"type": "string", | ||
"maxLength": 255 | ||
} | ||
}, | ||
"required": [ | ||
"vendorId" | ||
] | ||
} | ||
}, | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"status": { | ||
"$ref": "#/definitions/GenericStatusEnumType" | ||
}, | ||
"statusInfo": { | ||
"$ref": "#/definitions/StatusInfoType" | ||
}, | ||
"customData": { | ||
"$ref": "#/definitions/CustomDataType" | ||
} | ||
}, | ||
"required": [ | ||
"status" | ||
] | ||
} |
59 changes: 59 additions & 0 deletions
59
src/tests/schema_validation/schemas/v2.1/AdjustPeriodicEventStreamRequest.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"$id": "urn:OCPP:Cp:2:2025:1:AdjustPeriodicEventStreamRequest", | ||
"comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License", | ||
"definitions": { | ||
"PeriodicEventStreamParamsType": { | ||
"javaType": "PeriodicEventStreamParams", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"interval": { | ||
"description": "Time in seconds after which stream data is sent.\r\n", | ||
"type": "integer", | ||
"minimum": 0.0 | ||
}, | ||
"values": { | ||
"description": "Number of items to be sent together in stream.\r\n", | ||
"type": "integer", | ||
"minimum": 0.0 | ||
}, | ||
"customData": { | ||
"$ref": "#/definitions/CustomDataType" | ||
} | ||
} | ||
}, | ||
"CustomDataType": { | ||
"description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.", | ||
"javaType": "CustomData", | ||
"type": "object", | ||
"properties": { | ||
"vendorId": { | ||
"type": "string", | ||
"maxLength": 255 | ||
} | ||
}, | ||
"required": [ | ||
"vendorId" | ||
] | ||
} | ||
}, | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { | ||
"type": "integer", | ||
"minimum": 0.0 | ||
}, | ||
"params": { | ||
"$ref": "#/definitions/PeriodicEventStreamParamsType" | ||
}, | ||
"customData": { | ||
"$ref": "#/definitions/CustomDataType" | ||
} | ||
}, | ||
"required": [ | ||
"id", | ||
"params" | ||
] | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.