File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Schemas Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use RESTAPI\Core\Model;
1010use RESTAPI \Core \Schema ;
1111use RESTAPI \Fields \ForeignModelField ;
1212use RESTAPI \Fields \NestedModelField ;
13+ use RESTAPI \Models \RESTAPIVersion ;
1314use function RESTAPI \Core \Tools \get_classes_from_namespace ;
1415
1516/**
@@ -129,7 +130,8 @@ class NativeSchema extends Schema {
129130 * @return string The full schema string for this Schema class in JSON format
130131 */
131132 public function get_schema_str (): string {
132- $ schema = ['endpoints ' => [], 'models ' => []];
133+ $ version = new RESTAPIVersion ();
134+ $ schema = ['version ' => $ version ->current_version ->value , 'endpoints ' => [], 'models ' => []];
133135
134136 # Get all endpoint metadata
135137 foreach (get_classes_from_namespace ('RESTAPI\Endpoints ' ) as $ endpoint_class ) {
You can’t perform that action at this time.
0 commit comments