diff --git a/cli.js b/cli.js old mode 100644 new mode 100755 diff --git a/examples/docs/README.md b/examples/docs/README.md index b15a093441a9b731fbb948a81a348d9e167ded0a..cbf8be85683526a0b9ddbc90a9d00def620cb003 100644 --- a/examples/docs/README.md +++ b/examples/docs/README.md @@ -6,24 +6,24 @@ ## / -* [Abstract](./abstract.schema.md) – `https://example.com/schemas/abstract` -* [Arrays](./arrays.schema.md) – `https://example.com/schemas/arrays` -* [Complex References ](./complex.schema.md) – `https://example.com/schemas/complex` -* [Constant Types](./constants.schema.md) – `https://example.com/schemas/constants` -* [Custom](./custom.schema.md) – `https://example.com/schemas/custom` -* [Deeply Extending](./deepextending.schema.md) – `https://example.com/schemas/deepextending` -* [Definitions](./definitions.schema.md) – `https://example.com/schemas/definitions` -* [Enumerated ](./enums.schema.md) – `https://example.com/schemas/enums` -* [Example](./example.schema.md) – `https://example.com/schemas/example` -* [Examples](./examples.schema.md) – `https://example.com/schemas/examples` -* [Extending](./extending.schema.md) – `https://example.com/schemas/extending` -* [Extensible](./extensible.schema.md) – `https://example.com/schemas/extensible` -* [Identifiable](./identifiable.schema.md) – `https://example.com/schemas/identifiable` -* [Simple](./simple.schema.md) – `https://example.com/schemas/simple` -* [Simple Types](./simpletypes.schema.md) – `https://example.com/schemas/simpletypes` -* [Stabilizing](./stabilizing.schema.md) – `https://example.com/schemas/stabilizing` +* [Abstract](./abstract.schema.md) – `https://example.com/schemas/abstract` (Unknown) +* [Arrays](./arrays.schema.md) – `https://example.com/schemas/arrays` (Unknown) +* [Complex References ](./complex.schema.md) – `https://example.com/schemas/complex` (Unknown) +* [Constant Types](./constants.schema.md) – `https://example.com/schemas/constants` (Unknown) +* [Custom](./custom.schema.md) – `https://example.com/schemas/custom` (Unknown) +* [Deeply Extending](./deepextending.schema.md) – `https://example.com/schemas/deepextending` (Unknown) +* [Definitions](./definitions.schema.md) – `https://example.com/schemas/definitions` (Unknown) +* [Enumerated ](./enums.schema.md) – `https://example.com/schemas/enums` (Unknown) +* [Example](./example.schema.md) – `https://example.com/schemas/example` (Unknown) +* [Examples](./examples.schema.md) – `https://example.com/schemas/examples` (Unknown) +* [Extending](./extending.schema.md) – `https://example.com/schemas/extending` (Unknown) +* [Extensible](./extensible.schema.md) – `https://example.com/schemas/extensible` (Unknown) +* [Identifiable](./identifiable.schema.md) – `https://example.com/schemas/identifiable` (Unknown) +* [Simple](./simple.schema.md) – `https://example.com/schemas/simple` (Unknown) +* [Simple Types](./simpletypes.schema.md) – `https://example.com/schemas/simpletypes` (Unknown) +* [Stabilizing](./stabilizing.schema.md) – `https://example.com/schemas/stabilizing` (Stabilizing) ## /subdir/ -* [Subdir](./subdir/subdir.schema.md) – `https://example.com/schemas/subdir/subdir` +* [Subdir](./subdir/subdir.schema.md) – `https://example.com/schemas/subdir/subdir` (Unknown) diff --git a/lib/readmeWriter.js b/lib/readmeWriter.js index ddac3dd15e10f45e93dbb0ed1758e61e18c2c2f6..8b047a9141be7a59ad68f5666e20e51cf50096f4 100644 --- a/lib/readmeWriter.js +++ b/lib/readmeWriter.js @@ -38,6 +38,7 @@ const generateReadme = function(paths, schemas, out, base) { id: schema.jsonSchema.$id, title: schema.jsonSchema.title, full: schema.filePath, + status: schema.jsonSchema['meta:status'] !== undefined ? (schema.jsonSchema['meta:status'].charAt(0).toUpperCase() + schema.jsonSchema['meta:status'].slice(1)) : 'Unknown', relative: relativePath(schema.filePath, base), dir: directory(schema.filePath, base), }; diff --git a/spec/examples/README.md b/spec/examples/README.md index b15a093441a9b731fbb948a81a348d9e167ded0a..cbf8be85683526a0b9ddbc90a9d00def620cb003 100644 --- a/spec/examples/README.md +++ b/spec/examples/README.md @@ -6,24 +6,24 @@ ## / -* [Abstract](./abstract.schema.md) – `https://example.com/schemas/abstract` -* [Arrays](./arrays.schema.md) – `https://example.com/schemas/arrays` -* [Complex References ](./complex.schema.md) – `https://example.com/schemas/complex` -* [Constant Types](./constants.schema.md) – `https://example.com/schemas/constants` -* [Custom](./custom.schema.md) – `https://example.com/schemas/custom` -* [Deeply Extending](./deepextending.schema.md) – `https://example.com/schemas/deepextending` -* [Definitions](./definitions.schema.md) – `https://example.com/schemas/definitions` -* [Enumerated ](./enums.schema.md) – `https://example.com/schemas/enums` -* [Example](./example.schema.md) – `https://example.com/schemas/example` -* [Examples](./examples.schema.md) – `https://example.com/schemas/examples` -* [Extending](./extending.schema.md) – `https://example.com/schemas/extending` -* [Extensible](./extensible.schema.md) – `https://example.com/schemas/extensible` -* [Identifiable](./identifiable.schema.md) – `https://example.com/schemas/identifiable` -* [Simple](./simple.schema.md) – `https://example.com/schemas/simple` -* [Simple Types](./simpletypes.schema.md) – `https://example.com/schemas/simpletypes` -* [Stabilizing](./stabilizing.schema.md) – `https://example.com/schemas/stabilizing` +* [Abstract](./abstract.schema.md) – `https://example.com/schemas/abstract` (Unknown) +* [Arrays](./arrays.schema.md) – `https://example.com/schemas/arrays` (Unknown) +* [Complex References ](./complex.schema.md) – `https://example.com/schemas/complex` (Unknown) +* [Constant Types](./constants.schema.md) – `https://example.com/schemas/constants` (Unknown) +* [Custom](./custom.schema.md) – `https://example.com/schemas/custom` (Unknown) +* [Deeply Extending](./deepextending.schema.md) – `https://example.com/schemas/deepextending` (Unknown) +* [Definitions](./definitions.schema.md) – `https://example.com/schemas/definitions` (Unknown) +* [Enumerated ](./enums.schema.md) – `https://example.com/schemas/enums` (Unknown) +* [Example](./example.schema.md) – `https://example.com/schemas/example` (Unknown) +* [Examples](./examples.schema.md) – `https://example.com/schemas/examples` (Unknown) +* [Extending](./extending.schema.md) – `https://example.com/schemas/extending` (Unknown) +* [Extensible](./extensible.schema.md) – `https://example.com/schemas/extensible` (Unknown) +* [Identifiable](./identifiable.schema.md) – `https://example.com/schemas/identifiable` (Unknown) +* [Simple](./simple.schema.md) – `https://example.com/schemas/simple` (Unknown) +* [Simple Types](./simpletypes.schema.md) – `https://example.com/schemas/simpletypes` (Unknown) +* [Stabilizing](./stabilizing.schema.md) – `https://example.com/schemas/stabilizing` (Stabilizing) ## /subdir/ -* [Subdir](./subdir/subdir.schema.md) – `https://example.com/schemas/subdir/subdir` +* [Subdir](./subdir/subdir.schema.md) – `https://example.com/schemas/subdir/subdir` (Unknown) diff --git a/spec/lib/integrationTest.spec.js b/spec/lib/integrationTest.spec.js index 7101d6d7be8979a68f015348218b9cff66af942d..ba3e13a60a47206b93afbbe031c15f29b5026492 100644 --- a/spec/lib/integrationTest.spec.js +++ b/spec/lib/integrationTest.spec.js @@ -50,7 +50,6 @@ describe('Compare results', () => { '--link-status', 'status.md' ]); - ls.on('close', code => { expect(code).toEqual(0); diff --git a/templates/md/readme.ejs b/templates/md/readme.ejs index a275b9ce43984f5c7199a5c700c83f1e2c8d7dda..9bd71f24855c6a0279e27a465119fe07bd96359b 100644 --- a/templates/md/readme.ejs +++ b/templates/md/readme.ejs @@ -11,5 +11,5 @@ <% _.forIn(groups, (schemas, group) => { %> ## <%= group %> <% _.forEach(_.sortBy(schemas, [o => { return o.title }]), schema => { %> -* [<%= schema.title %>](.<%= schema.relative %>.schema.md) – `<%= schema.id %>`<% }); %> +* [<%= schema.title %>](.<%= schema.relative %>.schema.md) – `<%= schema.id %>` (<%= schema.status %>)<% }); %> <% }); %>