Skip to content

Commit 6d91c28

Browse files
authored
Merge pull request #216 from Digipalvelutehdas/develop
Merging develop to master for release 0.38.0
2 parents 2ca5750 + 506dcd5 commit 6d91c28

File tree

108 files changed

+1310
-793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1310
-793
lines changed

.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"import/resolver": "meteor"
1616
},
1717
"rules": {
18+
"arrow-body-style": [
19+
2,
20+
"always"
21+
],
1822
"comma-dangle": [
1923
2,
2024
"always-multiline"

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Use the following guidelines when contributing to this project.
3030
- [File structure](#file-structure)
3131
- [File names](#file-names)
3232
- [Collection/Schema structure](#collectionschema-structure)
33+
- [Explicit required fields](#explicit-required-fields)
34+
- [Schema changes](#schema-changes)
3335
- [Internationalization (i18n)](#internationalization-i18n)
3436
- [i18n key structure](#i18n-key-structure)
3537
- [Template text (HTML/Blaze)](#template-text-htmlblaze)
@@ -362,6 +364,22 @@ CollectionName.schema.i18n("schemas.collection_name");
362364
// Attach schema to collection for validation, etc.
363365
CollectionName.attachSchema(CollectionName.schema);
364366
```
367+
### Explicit required fields
368+
When defining schemas, we need to designate some fields as *required* or *optional*. By default if we do not designate a field as *required* or *optional*, it will be implicitly *required*.
369+
370+
Following the guideline of **explicit is better than implicit**, all fields should be explicitly defined as *required* or *optional*:
371+
372+
```js
373+
// Schema object
374+
requiredField : {
375+
...
376+
optional: false
377+
},
378+
optionalField: {
379+
...
380+
optional: true
381+
}
382+
```
365383

366384
### Schema changes
367385

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ For API consumers APInf provides simple key management, key usage analytics and
3838

3939

4040
# Development status
41-
[![Stories in Ready](https://badge.waffle.io/apinf/api-umbrella-dashboard.png?label=ready&title=Ready)](https://waffle.io/apinf/api-umbrella-dashboard)
41+
[![Stories in Ready](https://badge.waffle.io/apinf/platform.png?label=ready&title=Ready)](https://waffle.io/apinf/api-umbrella-dashboard)
4242

43-
[![Throughput Graph](https://graphs.waffle.io/apinf/api-umbrella-dashboard/throughput.svg)](https://waffle.io/apinf/api-umbrella-dashboard/metrics)
43+
[![Throughput Graph](https://graphs.waffle.io/apinf/platform/throughput.svg)](https://waffle.io/apinf/platform/metrics)
4444

4545
## Source code visualization
4646
Our project source code has changed throughout the project lifespan.

about/client/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h3>
2828
Apinf
2929
</dt>
3030
<dd>
31-
0.37.0
31+
0.38.0
3232
</dd>
3333
<dt>
3434
API Umbrella

catalogue/client/catalogue.html renamed to api_catalog/client/api_catalog.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
<template name="catalogue">
1+
<template name="apiCatalog">
22
<div class="container">
33
<h1 class="page-header">
44
{{_ "catalogue_Title" }}
55
</h1>
66

7-
{{> catalogueToolbar apis=apis }}
7+
{{> apiCatalogToolbar apis=apis }}
88

99
<!-- if viewMode is table, show table -->
1010
{{# if gridViewMode }}
1111
{{# if Template.subscriptionsReady }}
12-
{{> catalogueGrid apis=apis }}
12+
{{> apiCatalogGrid apis=apis }}
1313
{{ else }}
1414
{{> spinner }}
1515
{{/ if }}
@@ -18,7 +18,7 @@ <h1 class="page-header">
1818
<!-- if viewMode is table, show table -->
1919
{{# if tableViewMode }}
2020
{{# if Template.subscriptionsReady }}
21-
{{> catalogueTable apis=apis }}
21+
{{> apiCatalogTable apis=apis }}
2222
{{ else }}
2323
{{> spinner }}
2424
{{/ if }}

catalogue/client/catalogue.js renamed to api_catalog/client/api_catalog.js

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { FlowRouter } from 'meteor/kadira:flow-router';
66
import { Apis } from '/apis/collection';
77
import { ApiBookmarks } from '/bookmarks/collection';
88

9-
Template.catalogue.onCreated(function () {
9+
Template.apiCatalog.onCreated(function () {
1010
// Get reference to template instance
1111
const instance = this;
1212
// Get user id
@@ -110,12 +110,12 @@ Template.catalogue.onCreated(function () {
110110
});
111111
});
112112

113-
Template.catalogue.onRendered(function () {
113+
Template.apiCatalog.onRendered(function () {
114114
// Activate tooltips on all relevant items
115115
$('.toolbar-tooltip').tooltip({ placement: 'bottom' });
116116
});
117117

118-
Template.catalogue.helpers({
118+
Template.apiCatalog.helpers({
119119
apis () {
120120
// Return items of apis collection via Pagination
121121
return Template.instance().pagination.getPage();
@@ -137,22 +137,3 @@ Template.catalogue.helpers({
137137
return (viewMode === 'table');
138138
},
139139
});
140-
141-
Template.catalogue.events({
142-
'change #sort-select': function (event) {
143-
// Set URL parameter
144-
FlowRouter.setQueryParams({ sortBy: event.target.value });
145-
},
146-
'change [name=sort-direction]': function (event) {
147-
// Set URL parameter
148-
FlowRouter.setQueryParams({ sortDirection: event.target.value });
149-
},
150-
'change [name=filter-options]': function (event) {
151-
// Set URL parameter
152-
FlowRouter.setQueryParams({ filterBy: event.target.value });
153-
},
154-
'change [name=view-mode]': function (event) {
155-
// Set URL parameter
156-
FlowRouter.setQueryParams({ viewMode: event.target.value });
157-
},
158-
});

catalogue/client/catalogue.less renamed to api_catalog/client/api_catalog.less

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
@import "/core/client/style/bootstrap-variables.less";
22

3-
.sort-options-select {
4-
padding-left: 0.5em;
5-
}
6-
7-
.filter-options-menu {
8-
padding-left: 1em;
9-
}
10-
11-
.sort-filter-toolbar {
12-
padding-left: 0;
13-
}
14-
15-
.sort-filter-toolbar-title {
16-
margin-left: 0;
17-
}
18-
19-
.sort-options-form {
20-
display: inline;
21-
}
22-
233
/* Class to make pagination buttons inactive */
244
.inactive a {
255
color: #d3d3d3 !important;

api_catalog/client/grid/grid.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template name="apiCatalogGrid">
2+
<div class="row">
3+
{{# each api in apis }}
4+
<div class="col-xl-2 col-lg-3 col-md-4 col-sm-6 col-xs-12">
5+
{{> apiCard api=api }}
6+
</div>
7+
{{/ each }}
8+
</div>
9+
</template>

catalogue/client/lib/router.js renamed to api_catalog/client/lib/router.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
22
import { FlowRouter } from 'meteor/kadira:flow-router';
33
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
44

5-
FlowRouter.route('/catalogue', {
5+
FlowRouter.route('/apis', {
66
// Get query parameters for Catalog page on Enter
77
triggersEnter: [function (context) {
88
if (!context.queryParams.sortBy) {
@@ -18,8 +18,8 @@ FlowRouter.route('/catalogue', {
1818
context.queryParams.filterBy = 'all';
1919
}
2020
}],
21-
name: 'catalogue',
21+
name: 'apiCatalog',
2222
action: function () {
23-
BlazeLayout.render('masterLayout', { main: 'catalogue' });
23+
BlazeLayout.render('masterLayout', { main: 'apiCatalog' });
2424
},
2525
});

catalogue/client/table/table.html renamed to api_catalog/client/table/table.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<template name="catalogueTable">
1+
<template name="apiCatalogTable">
22
<div class="table-responsive">
33
<table class="table table-striped table-bordered api-catalogue-table">
44
<tbody>
@@ -17,6 +17,9 @@ <h4 class="api-catalogue-table-title">
1717
{{ api.name }}
1818
</a>
1919
</h4>
20+
<!-- Api LifeCycleStatus Label -->
21+
{{> apiLifecycleStatus api=api }}
22+
2023
{{# unless api.isPublic }}
2124
<span class="label label-default label-align">private</span>
2225
{{/ unless }}

0 commit comments

Comments
 (0)