File tree Expand file tree Collapse file tree 9 files changed +135
-16
lines changed Expand file tree Collapse file tree 9 files changed +135
-16
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,6 @@ function documentClasses (templateData) {
48
48
return classNames
49
49
} , [ ] )
50
50
51
- const classTemplate = loadTemplate ( 'class' )
52
-
53
51
const classIndexData = {
54
52
classes : { }
55
53
}
@@ -61,22 +59,24 @@ function documentClasses (templateData) {
61
59
}
62
60
}
63
61
64
- console . log ( classIndexData )
65
-
62
+ const classTemplate = loadTemplate ( 'class' )
66
63
classes . forEach ( className => {
67
64
const fileName = `docs/code/classes/${ className } .md`
68
65
const classData = templateData
69
66
. filter ( jsdocBlock => jsdocBlock . memberof === className )
70
67
. sort ( ( a , b ) => {
71
68
return a . order < b . order ? - 1 : 1
72
- } ) . forEach ( classData => {
73
- if ( classData . kind === 'class' ) {
74
- classIndexData . classes [ className ] . description = classData . description
75
- }
76
69
} )
77
70
71
+ classData . forEach ( classData => {
72
+ if ( classData . kind === 'class' ) {
73
+ classIndexData . classes [ className ] . description = classData . description
74
+ }
75
+ } )
76
+
78
77
console . log ( `rendering ${ className } to ${ fileName } ` )
79
- fs . writeFileSync ( fileName , classTemplate ( { className, classData } ) )
78
+ const context = { className, classData }
79
+ fs . writeFileSync ( fileName , classTemplate ( context ) )
80
80
} )
81
81
82
82
console . log ( 'rendering index for class documentation' )
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ activeHeaderLinks: true
9
9
{{ jsDocBlock }}
10
10
{{ /each }}
11
11
12
- __This is an autogenerated class documentation for {{ className }} __
12
+ _This is an autogenerated class documentation for {{ className }} _
Original file line number Diff line number Diff line change
1
+ ### {{ name }} ()
2
+
3
+ {{ #if description }}
4
+ {{ description }}
5
+ {{ /if }}
Original file line number Diff line number Diff line change @@ -5,5 +5,38 @@ activeHeaderLinks: true
5
5
---
6
6
# Class Builder
7
7
8
+ JsonApi-based module builder for Vuex
8
9
9
- __ This is an autogenerated class documentation for Builder __
10
+ This module builder will create a vuex module based on the assumption of
11
+ working with valid json api resources.
12
+
13
+ - the proposed json api 1.1 pagination style meta attributes
14
+ (-> ; https://jsonapi.org/format/1.1/#fetching-pagination )
15
+
16
+ ## Builder()
17
+
18
+ Module Builder for Json: Api bound Vuex Modules
19
+
20
+ ### build()
21
+
22
+ Build the module for this builder instance
23
+
24
+ ### buildMutations()
25
+
26
+ Build the mutations
27
+
28
+ ### build()
29
+
30
+ Returns a new functional resource object
31
+
32
+ Functional resource objects are structurally identical to
33
+ normal JSON: API resource objects but are enhanced with
34
+ methods to simplify access to relationships.
35
+
36
+ ### strip()
37
+
38
+ Convenience method to get a spec-conforming version of
39
+ a resource object
40
+
41
+
42
+ _ This is an autogenerated class documentation for Builder_
Original file line number Diff line number Diff line change @@ -5,5 +5,7 @@ activeHeaderLinks: true
5
5
---
6
6
# Class FosJsRoutingRouter
7
7
8
+ Pluggable api router if you' ; re using Symfony and the FosJsRouting Bundle
8
9
9
- __ This is an autogenerated class documentation for FosJsRoutingRouter __
10
+
11
+ _ This is an autogenerated class documentation for FosJsRoutingRouter_
Original file line number Diff line number Diff line change @@ -5,5 +5,44 @@ activeHeaderLinks: true
5
5
---
6
6
# Class JsonApiRouter
7
7
8
+ A simple router implementation querying a json: api endpoint which delivers all
9
+ necessary route information
8
10
9
- __ This is an autogenerated class documentation for JsonApiRouter __
11
+ The endpoint must return a list of Route objects:
12
+
13
+ ` ;` ;` ; json
14
+ {
15
+ " ; data" ; : [
16
+ {
17
+ " ; type" ; : " ; Route" ; ,
18
+ " ; id" ; : " ; api.route.list" ; ,
19
+ " ; attributes" ; : {
20
+ " ; parameters" ; : [ ] ,
21
+ " ; url" ; : " ; api/route" ; ,
22
+ " ; method" ; : " ; list" ;
23
+ }
24
+ },
25
+ {
26
+ " ; type" ; : " ; Route" ; ,
27
+ " ; id" ; : " ; api.route.get" ; ,
28
+ " ; attributes" ; : {
29
+ " ; parameters" ; : [
30
+ " ; id" ;
31
+ ] ,
32
+ " ; url" ; : " ; api/route/{id}" ; ,
33
+ " ; method" ; : " ; get" ;
34
+ }
35
+ }
36
+ ]
37
+ }
38
+ ` ;` ;` ;
39
+
40
+ To initialize this router, simply ` ; new` ; it with the desired fetch path,
41
+ e.g. ` ; new JsonApiRouter(' ; /api/route' ; )` ; .
42
+
43
+ ### updateRoutes()
44
+
45
+ Update routes
46
+
47
+
48
+ _ This is an autogenerated class documentation for JsonApiRouter_
Original file line number Diff line number Diff line change @@ -6,4 +6,14 @@ activeHeaderLinks: true
6
6
# Class Route
7
7
8
8
9
- __ This is an autogenerated class documentation for Route __
9
+
10
+ ### prepare()
11
+
12
+ Prepare an url, replacing provided parameters
13
+
14
+ ### hasParameter()
15
+
16
+ Check if a parameter is allowed
17
+
18
+
19
+ _ This is an autogenerated class documentation for Route_
Original file line number Diff line number Diff line change @@ -5,5 +5,23 @@ activeHeaderLinks: true
5
5
---
6
6
# Class Router
7
7
8
+ Basic router implementation for the ResourcefulApi.
8
9
9
- __ This is an autogenerated class documentation for Router __
10
+ Automagically creating api bound modules builds on
11
+ an understanding of the available routes. To
12
+ easily instantiate a Store bound to an endpoint,
13
+ route information for that endpoint must be provided.
14
+
15
+ Since every endpoint is implemented differently and
16
+ the choice where this route information comes from
17
+ should be left to the endpoint developer, this
18
+ library only assumes that route loading is usually an
19
+ asynchronous process which eventually returns and
20
+ has a set of keyed-by-name ` ; Route` ; objects in
21
+ ` ; this.routes` ; .
22
+
23
+ ### addRoute()
24
+
25
+
26
+
27
+ _ This is an autogenerated class documentation for Router_
Original file line number Diff line number Diff line change @@ -5,5 +5,17 @@ activeHeaderLinks: true
5
5
---
6
6
# Class StaticRouter
7
7
8
+ Static router
8
9
9
- __ This is an autogenerated class documentation for StaticRouter __
10
+ It may be desirable to not do an additional request
11
+ for getting the api routes and instead bake them into
12
+ the code. To this avail, the ` ; StaticRouter` ; can be
13
+ initialized with a POJO of { id, url, parameters }
14
+ whereas parameters are parts of the url which can be replaced.
15
+
16
+ ## StaticRouter()
17
+
18
+
19
+
20
+
21
+ _ This is an autogenerated class documentation for StaticRouter_
You can’t perform that action at this time.
0 commit comments