Skip to content

Commit 939eb1a

Browse files
committed
refactor: remove library names for consistency across files and reformat the workspace
1 parent 6652e6c commit 939eb1a

File tree

27 files changed

+376
-154
lines changed

27 files changed

+376
-154
lines changed

formats/dogs_cbor/lib/dogs_cbor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// Support for doing something awesome.
22
///
33
/// More dartdocs go here.
4-
library dogs_cbor;
4+
library;
55

66
import 'dart:convert';
77

formats/dogs_toml/lib/dogs_toml.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
library dogs_toml;
1+
library;
22

33
import 'package:dogs_core/dogs_core.dart';
44
import 'package:toml/toml.dart';

formats/dogs_yaml/lib/dogs_yaml.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
library dogs_yaml;
1+
library;
22

33
import 'dart:collection';
44

packages/dogs_built/lib/dogs_built.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
library dogs_built;
1+
library;
22

33
import 'package:built_collection/built_collection.dart';
44
import 'package:built_value/serializer.dart';

packages/dogs_core/lib/dogs_schema.dart

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright 2022, the DOGs authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
library;
18+
119
import "dogs_core.dart";
220

321
/// Creates a schema type representing a string.
@@ -44,7 +62,6 @@ SchemaType enumeration(List<String> values) {
4462

4563
/// Extension methods for SchemaType to provide a fluent API for schema definitions.
4664
extension SchemaTypeExtension on SchemaType {
47-
4865
/// Makes this schema type an array of itself.
4966
SchemaType array() => SchemaType.array(this);
5067

@@ -126,7 +143,6 @@ extension SchemaTypeExtension on SchemaType {
126143
throw ArgumentError("Lt is not supported for $this");
127144
}
128145

129-
130146
/// Requires the value to be less than or equal to the given value.
131147
SchemaType lte(double value) {
132148
if (type == SchemaCoreType.number || type == SchemaCoreType.integer) {

packages/dogs_core/lib/src/converters/enum.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ typedef EnumToString<T> = String Function(T?);
2525
/// A [DogConverter] that allows for the conversion of enum values to and from strings.
2626
abstract class GeneratedEnumDogConverter<T extends Enum> extends DogConverter<T>
2727
with OperationMapMixin<T>, EnumConverter<T> {
28-
2928
/// Creates a new [GeneratedEnumDogConverter].
3029
GeneratedEnumDogConverter();
3130

packages/dogs_core/lib/src/hooks.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ const ExcludeNull excludeNull = ExcludeNull();
193193
/// A **field** and **class** level serialization hook that excludes fields
194194
/// with a `null` value from the serialized map.
195195
class ExcludeNull extends SerializationHook with FieldSerializationHook {
196-
197196
/// A **field** and **class** level serialization hook that excludes fields
198197
/// with a `null` value from the serialized map.
199198
const ExcludeNull();

packages/dogs_core/lib/src/schema/materialize.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class SchemaObjectUnroller {
3838
cloned.properties = <String, dynamic>{};
3939
for (var inheritedProperty in SchemaProperties.$inheritedProperties) {
4040
if (type.properties.containsKey(inheritedProperty)) {
41-
cloned.properties[inheritedProperty] = type.properties[inheritedProperty];
41+
cloned.properties[inheritedProperty] =
42+
type.properties[inheritedProperty];
4243
}
4344
}
4445

packages/dogs_core/lib/src/schema/spec.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ class SchemaConfig {
6666
class SchemaField {
6767
/// The name/key of the field.
6868
String name;
69+
6970
/// The type of the field.
7071
SchemaType type;
72+
7173
/// Additional properties of the field.
7274
Map<String, dynamic> properties = {};
7375

@@ -463,18 +465,25 @@ final class SchemaReference extends SchemaType {
463465
enum SchemaCoreType {
464466
/// Represents any JSON value.
465467
any(["string", "number", "integer", "boolean", "object", "array"]),
468+
466469
/// Represents a string value.
467470
string(["string"]),
471+
468472
/// Represents a numeric value.
469473
number(["number"]),
474+
470475
/// Represents an integer value.
471476
integer(["integer"]),
477+
472478
/// Represents a boolean value.
473479
boolean(["boolean"]),
480+
474481
/// Represents an object value.
475482
object(["object"]),
483+
476484
/// Represents an array value.
477485
array(["array"]),
486+
478487
/// Represents a null value.
479488
$null(["null"]);
480489

packages/dogs_core/lib/src/schema/visitor.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ abstract class SchemaFieldVisitor {
3030

3131
/// Internal class to track schema passes and avoid recursion.
3232
class SchemaPass {
33-
3433
/// The current schema pass, or null if none is active.
3534
static SchemaPass? current;
3635

0 commit comments

Comments
 (0)