diff --git a/docs/0.9.10.html b/docs/0.9.10.html index f1c014878..20bdaf45c 100644 --- a/docs/0.9.10.html +++ b/docs/0.9.10.html @@ -4,7 +4,7 @@
enum: Animal
serialized: byName
values:
- dog
- cat
- bird
serialized
has two valid values byName
and byIndex
. When using byName
the string literal of the enum is used, when using byIndex
the index value (0, 1, 2, etc) is used.
It's recommended to always set serialized
to byName
in any new Enum models, as this is less fragile and will be changed to the default setting in version 2 of Serverpod.
It's recommended to always set serialized
to byName
in any new Enum models, as this is less fragile and will be changed to the default setting in version 3 of Serverpod.
Serverpod allows you to add documentation to your serializable objects in a similar way that you would add documentation to your Dart code. Use three hashes (###) to indicate that a comment should be considered documentation.
### Information about a company.
class: Company
fields:
### The name of the company.
name: String
### The date the company was founded, if known.
foundedDate: DateTime?
### A list of people currently employed at the company.
employees: List<Employee>
enum: Animal
serialized: byName
values:
- dog
- cat
- bird
serialized
has two valid values byName
and byIndex
. When using byName
the string literal of the enum is used, when using byIndex
the index value (0, 1, 2, etc) is used.
It's recommended to always set serialized
to byName
in any new Enum models, as this is less fragile and will be changed to the default setting in version 2 of Serverpod.
It's recommended to always set serialized
to byName
in any new Enum models, as this is less fragile and will be changed to the default setting in version 3 of Serverpod.
Serverpod allows you to add documentation to your serializable objects in a similar way that you would add documentation to your Dart code. Use three hashes (###) to indicate that a comment should be considered documentation.
### Information about a company.
class: Company
fields:
### The name of the company.
name: String
### The date the company was founded, if known.
foundedDate: DateTime?
### A list of people currently employed at the company.
employees: List<Employee>
With the release of Serverpod 2.0, the fromJson
constructor has been simplified and the serializationManager
has been removed:
factory ClassName.fromJson(
Map<String, dynamic> json,
) {
return ClassName(
json['name'],
);
}
SerializableEntity
The SerializableEntity
class is deprecated and will be removed in version 2.1. Please implement the SerializableModel
interface instead for creating serializable models.
The SerializableEntity
class is deprecated and will be removed in version 3. Please implement the SerializableModel
interface instead for creating serializable models.
To migrate your code from SerializableEntity
to SerializableModel
, replace extends SerializableEntity
with implements SerializableModel
in your model classes.
SerializableEntity
",id:"deprecation-notice-for-serializableentity",level:2},{value:"Migration Guide",id:"migration-guide",level:3},{value:"Example",id:"example",level:4}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"upgrade-to-20",children:"Upgrade to 2.0"})}),"\n",(0,a.jsx)(n.h2,{id:"changes-to-authentication",children:"Changes to authentication"}),"\n",(0,a.jsxs)(n.p,{children:["The base auth implementation has been removed from Serverpod core and moved into the ",(0,a.jsx)(n.code,{children:"serverpod_auth"})," package. If you are not using authentication at all this change does not impact you. If you are using the auth module already the transition is simple."]}),"\n",(0,a.jsxs)(n.p,{children:["The default authentication handler will now throw an ",(0,a.jsx)(n.code,{children:"UnimplementedError"}),". It is now required to supply the authentication handler to the Serverpod object, in your server.dart file make the following change:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-dart",children:"import 'package:serverpod_auth_server/serverpod_auth_server.dart' as auth;\n\nvoid run(ListSerializableEntity
",id:"deprecation-notice-for-serializableentity",level:2},{value:"Migration Guide",id:"migration-guide",level:3},{value:"Example",id:"example",level:4}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"upgrade-to-20",children:"Upgrade to 2.0"})}),"\n",(0,a.jsx)(n.h2,{id:"changes-to-authentication",children:"Changes to authentication"}),"\n",(0,a.jsxs)(n.p,{children:["The base auth implementation has been removed from Serverpod core and moved into the ",(0,a.jsx)(n.code,{children:"serverpod_auth"})," package. If you are not using authentication at all this change does not impact you. If you are using the auth module already the transition is simple."]}),"\n",(0,a.jsxs)(n.p,{children:["The default authentication handler will now throw an ",(0,a.jsx)(n.code,{children:"UnimplementedError"}),". It is now required to supply the authentication handler to the Serverpod object, in your server.dart file make the following change:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-dart",children:"import 'package:serverpod_auth_server/serverpod_auth_server.dart' as auth;\n\nvoid run(ListSerializableEntity
",id:"deprecation-notice-for-serializableentity",level:2},{value:"Migration Guide",id:"migration-guide",level:3},{value:"Example",id:"example",level:4}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"upgrade-to-20",children:"Upgrade to 2.0"})}),"\n",(0,a.jsx)(n.h2,{id:"changes-to-authentication",children:"Changes to authentication"}),"\n",(0,a.jsxs)(n.p,{children:["The base auth implementation has been removed from Serverpod core and moved into the ",(0,a.jsx)(n.code,{children:"serverpod_auth"})," package. If you are not using authentication at all this change does not impact you. If you are using the auth module already the transition is simple."]}),"\n",(0,a.jsxs)(n.p,{children:["The default authentication handler will now throw an ",(0,a.jsx)(n.code,{children:"UnimplementedError"}),". It is now required to supply the authentication handler to the Serverpod object, in your server.dart file make the following change:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-dart",children:"import 'package:serverpod_auth_server/serverpod_auth_server.dart' as auth;\n\nvoid run(ListSerializableEntity
",id:"deprecation-notice-for-serializableentity",level:2},{value:"Migration Guide",id:"migration-guide",level:3},{value:"Example",id:"example",level:4}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"upgrade-to-20",children:"Upgrade to 2.0"})}),"\n",(0,a.jsx)(n.h2,{id:"changes-to-authentication",children:"Changes to authentication"}),"\n",(0,a.jsxs)(n.p,{children:["The base auth implementation has been removed from Serverpod core and moved into the ",(0,a.jsx)(n.code,{children:"serverpod_auth"})," package. If you are not using authentication at all this change does not impact you. If you are using the auth module already the transition is simple."]}),"\n",(0,a.jsxs)(n.p,{children:["The default authentication handler will now throw an ",(0,a.jsx)(n.code,{children:"UnimplementedError"}),". It is now required to supply the authentication handler to the Serverpod object, in your server.dart file make the following change:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-dart",children:"import 'package:serverpod_auth_server/serverpod_auth_server.dart' as auth;\n\nvoid run(ListSerializableEntity
",id:"deprecation-notice-for-serializableentity",level:2},{value:"Migration Guide",id:"migration-guide",level:3},{value:"Example",id:"example",level:4}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"upgrade-to-20",children:"Upgrade to 2.0"})}),"\n",(0,a.jsx)(n.h2,{id:"changes-to-authentication",children:"Changes to authentication"}),"\n",(0,a.jsxs)(n.p,{children:["The base auth implementation has been removed from Serverpod core and moved into the ",(0,a.jsx)(n.code,{children:"serverpod_auth"})," package. If you are not using authentication at all this change does not impact you. If you are using the auth module already the transition is simple."]}),"\n",(0,a.jsxs)(n.p,{children:["The default authentication handler will now throw an ",(0,a.jsx)(n.code,{children:"UnimplementedError"}),". It is now required to supply the authentication handler to the Serverpod object, in your server.dart file make the following change:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-dart",children:"import 'package:serverpod_auth_server/serverpod_auth_server.dart' as auth;\n\nvoid run(ListSerializableEntity
",id:"deprecation-notice-for-serializableentity",level:2},{value:"Migration Guide",id:"migration-guide",level:3},{value:"Example",id:"example",level:4}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"upgrade-to-20",children:"Upgrade to 2.0"})}),"\n",(0,a.jsx)(n.h2,{id:"changes-to-authentication",children:"Changes to authentication"}),"\n",(0,a.jsxs)(n.p,{children:["The base auth implementation has been removed from Serverpod core and moved into the ",(0,a.jsx)(n.code,{children:"serverpod_auth"})," package. If you are not using authentication at all this change does not impact you. If you are using the auth module already the transition is simple."]}),"\n",(0,a.jsxs)(n.p,{children:["The default authentication handler will now throw an ",(0,a.jsx)(n.code,{children:"UnimplementedError"}),". It is now required to supply the authentication handler to the Serverpod object, in your server.dart file make the following change:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-dart",children:"import 'package:serverpod_auth_server/serverpod_auth_server.dart' as auth;\n\nvoid run(Listenum: Animal
serialized: byName
values:
- dog
- cat
- bird
serialized
has two valid values byName
and byIndex
. When using byName
the string literal of the enum is used, when using byIndex
the index value (0, 1, 2, etc) is used.
It's recommended to always set serialized
to byName
in any new Enum models, as this is less fragile and will be changed to the default setting in version 2 of Serverpod.
It's recommended to always set serialized
to byName
in any new Enum models, as this is less fragile and will be changed to the default setting in version 3 of Serverpod.
Serverpod allows you to add documentation to your serializable objects in a similar way that you would add documentation to your Dart code. Use three hashes (###) to indicate that a comment should be considered documentation.
### Information about a company.
class: Company
fields:
### The name of the company.
name: String
### The date the company was founded, if known.
foundedDate: DateTime?
### A list of people currently employed at the company.
employees: List<Employee>
enum: Animal
serialized: byName
values:
- dog
- cat
- bird
serialized
has two valid values byName
and byIndex
. When using byName
the string literal of the enum is used, when using byIndex
the index value (0, 1, 2, etc) is used.
It's recommended to always set serialized
to byName
in any new Enum models, as this is less fragile and will be changed to the default setting in version 2 of Serverpod.
It's recommended to always set serialized
to byName
in any new Enum models, as this is less fragile and will be changed to the default setting in version 3 of Serverpod.
Serverpod allows you to add documentation to your serializable objects in a similar way that you would add documentation to your Dart code. Use three hashes (###) to indicate that a comment should be considered documentation.
### Information about a company.
class: Company
fields:
### The name of the company.
name: String
### The date the company was founded, if known.
foundedDate: DateTime?
### A list of people currently employed at the company.
employees: List<Employee>
With the release of Serverpod 2.0, the fromJson
constructor has been simplified and the serializationManager
has been removed:
factory ClassName.fromJson(
Map<String, dynamic> json,
) {
return ClassName(
json['name'],
);
}
SerializableEntity
The SerializableEntity
class is deprecated and will be removed in version 2.1. Please implement the SerializableModel
interface instead for creating serializable models.
The SerializableEntity
class is deprecated and will be removed in version 3. Please implement the SerializableModel
interface instead for creating serializable models.
To migrate your code from SerializableEntity
to SerializableModel
, replace extends SerializableEntity
with implements SerializableModel
in your model classes.
With the release of Serverpod 2.0, the fromJson
constructor has been simplified and the serializationManager
has been removed:
factory ClassName.fromJson(
Map<String, dynamic> json,
) {
return ClassName(
json['name'],
);
}
SerializableEntity
The SerializableEntity
class is deprecated and will be removed in version 2.1. Please implement the SerializableModel
interface instead for creating serializable models.
The SerializableEntity
class is deprecated and will be removed in version 3. Please implement the SerializableModel
interface instead for creating serializable models.
To migrate your code from SerializableEntity
to SerializableModel
, replace extends SerializableEntity
with implements SerializableModel
in your model classes.