File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,19 @@ its input before using it, some nested parts of C<%common_fields> may get
200200changed or blessed. Don't rely on its contents being exactly as you defined it,
201201or deep-clone it yourself before passing it to Whelk.
202202
203+ =head2 Where to define the schemas?
204+
205+ It is not important where your schemas are defined, as long as they are defined
206+ before they are used. Whelk provides C<schemas > method as syntax sugar, which
207+ will be called just once for each controller. That does not mean schemas must
208+ be defined there, they may as well be called at the package level (during
209+ package compilation) or anywhere else.
210+
211+ You can use it to your advantage when creating schemas which should be used for
212+ the entire application, not just for one controller. It can safely be put in a
213+ separate package, or even in the C<app.psgi > itself (even though it's surely
214+ not a good place to keep them).
215+
203216=head2 Available types
204217
205218Each new schema must have a C<type > defined. All types share these common configuration values:
You can’t perform that action at this time.
0 commit comments