Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating clean-up branch from main #172

Merged
merged 107 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
2b16fcb
Update other-implementations.md
mbaudis Mar 14, 2023
a0fb9f0
Update index.md
mbaudis Mar 14, 2023
b851579
Update index.md
mbaudis Mar 14, 2023
213fddc
Update security.md
mbaudis Mar 14, 2023
ee11ce1
Update bugs-changes-log.md
mbaudis Mar 14, 2023
799133b
Update variant-queries.md
mbaudis Mar 30, 2023
c8c2904
Update README.md
d-salgado Apr 11, 2023
5820573
Merge pull request #71 from d-salgado/patch-2
jrambla Apr 12, 2023
b8ed6f8
adding contribution/development pages
mbaudis May 8, 2023
d490eb7
missing object type fix
mbaudis May 24, 2023
634283d
Update CHANGELOG.md
mbaudis May 26, 2023
fca3233
Update filters.md
mbaudis May 31, 2023
5ba60b3
Update filters.md
mbaudis May 31, 2023
fb7b48d
Update filters.md
mbaudis May 31, 2023
68f319d
age queries in FAQ
mbaudis May 31, 2023
3f1d174
Nav mod
mbaudis May 31, 2023
8065376
fix disease ageOfOnset examples
mbaudis Jun 1, 2023
5468efe
http => https for all links
mbaudis Jun 4, 2023
1d8f804
documentation change log update
mbaudis Jun 4, 2023
11312cd
fixing the ontology term CUSTOM format
mbaudis Jun 10, 2023
622b017
documentation
mbaudis Jun 11, 2023
8d72492
documentation restructuring and additions
mbaudis Jun 11, 2023
ac3e038
rename/restructure changes page
mbaudis Jun 12, 2023
278648e
Update records.md
mbaudis Jun 12, 2023
87a17ab
Update records.md
mbaudis Jun 12, 2023
1c52ad2
Amending some examples
jrambla Jun 13, 2023
a75dbbd
Merge branch 'website-docs' of https://github.com/ga4gh-beacon/beacon…
jrambla Jun 13, 2023
23d49cc
fix yaml for filteringTerms
mbaudis Jun 14, 2023
bc666cd
link fix
mbaudis Jun 14, 2023
16db543
comment broken Beacon link for http://clinbioinfosspa.es
mbaudis Jun 14, 2023
c7cb886
remove numeric example from doc
mbaudis Jun 14, 2023
01381e6
Update filters.md
mbaudis Jun 15, 2023
62d704d
complexValue required type fixed
Jun 16, 2023
cfec496
fixed position of required
Jun 16, 2023
be4ff29
added required again for quantityType
Jun 16, 2023
5b47a87
Update entryTypeDefinition.yaml
mbaudis Jun 18, 2023
647a167
Merge pull request #89 from ga4gh-beacon/hotfix_complexValue
costero-e Jun 19, 2023
4d104ce
new gh actions
Jun 19, 2023
d72462a
Merge branch 'main' into website-docs
costero-e Jun 19, 2023
6aeb06f
Update entryTypeDefinition.json
mbaudis Jun 19, 2023
d3f7a92
removed ontologyTermForThisType requirement
mbaudis Jun 19, 2023
d2be0e2
Merge pull request #86 from ga4gh-beacon/website-docs
costero-e Jun 19, 2023
dd943ae
entry type as default instead entity
mbaudis Jun 19, 2023
94b7891
update entryType description
Jun 20, 2023
09417cb
correcting typo in index.md
costero-e Jun 21, 2023
4c5527e
doc comma-contatenation
mbaudis Jul 3, 2023
4d8c40b
re-activating mermaid2 plugin
mbaudis Jul 10, 2023
597d171
fixing website mkdocs action
mbaudis Jul 10, 2023
fb8bfc5
Update framework.md
mbaudis Jul 11, 2023
89e3b9d
Update framework.md
mbaudis Jul 11, 2023
a793c8c
FAQ, Boolean (non-)use
mbaudis Aug 8, 2023
898b22b
Update FAQ.md
mbaudis Aug 8, 2023
8680e9f
Update FAQ.md
mbaudis Aug 8, 2023
c09c3ef
updating branch organization description
costero-e Aug 17, 2023
e2190ef
add scopes[] to the FilteringTerm
redmitry Sep 5, 2023
cb3b2ff
for templates the format must be "uri-template".
redmitry Sep 5, 2023
8c1340d
Removing the AND exception note
mbaudis Sep 20, 2023
394a409
Update filters.md
mbaudis Sep 20, 2023
a45ccc7
provide "required" properties for the "age" and "ageRange" schemas
redmitry Oct 6, 2023
1f6fb0b
comment changes
redmitry Oct 10, 2023
7c64fdf
Merge pull request #113 from redmitry/invalid-timeElement-fix
costero-e Oct 10, 2023
401a0cb
Update filters.md
mbaudis Oct 10, 2023
c1e8f5f
Update variant-queries.md
mbaudis Oct 31, 2023
4921810
BeaconGeneQuery-graphics
mbaudis Nov 9, 2023
f1f6265
Update BeaconGeneQuery-graphics.png
mbaudis Nov 12, 2023
c1ccadc
query options first order nav links
mbaudis Nov 14, 2023
e2d7941
Merge pull request #109 from redmitry/FileringTerm.scopes
costero-e Jan 10, 2024
f4f8264
Merge branch 'main' into schema-urgent-fixes
costero-e Jan 16, 2024
edf561e
filtering terms results example listed
costero-e Mar 20, 2024
1447418
fix "examples" beaconFilteringTermsResults.json
redmitry Mar 20, 2024
ce1c82d
Merge pull request #119 from ga4gh-beacon/filteringTerms_filteringTer…
redmitry Mar 21, 2024
db307ba
Merge branch 'main' into develop
costero-e Mar 21, 2024
75850c3
Merge pull request #118 from ga4gh-beacon/develop
costero-e Mar 21, 2024
d3c2692
link fix and different TOC style
mbaudis Mar 22, 2024
aaf2028
Fix file naming conflict error in schemas-md on macOS APFS (case-inse…
mrueda Mar 26, 2024
f2f08ca
Remove clashing files
mrueda Mar 26, 2024
9aefbed
Merge pull request #122 from mrueda/website-docs
mbaudis Mar 26, 2024
b154dda
complexValue required relocated to correct level
costero-e Apr 11, 2024
afaf76a
Merge pull request #124 from ga4gh-beacon/hotfix_complexValue-required
costero-e Apr 12, 2024
f5be698
adding github actions demo file
costero-e May 3, 2024
7de0b56
Merge branch 'develop' into website-docs
costero-e May 3, 2024
58e68af
Merge pull request #127 from ga4gh-beacon/website-docs
mbaudis May 3, 2024
d2ee94b
Merge branch 'develop' into main
mbaudis Jul 6, 2024
cfcc85d
Hot Fix to align with json
mbaudis Jul 6, 2024
13f8ac9
Merge pull request #133 from ga4gh-beacon/main
mbaudis Jul 6, 2024
971a2ad
Update requestParameters.yaml for at least 1 end value
mbaudis Jul 6, 2024
33d2228
Update requestParameters.json for at least 1 value in end
mbaudis Jul 6, 2024
4db7f83
Merge pull request #132 from ga4gh-beacon/complex-value-required-src-…
costero-e Jul 10, 2024
9f9c96a
renaming endpoints for beaconMap
costero-e Jul 10, 2024
ae4214a
Merge pull request #134 from ga4gh-beacon/hotfix-beaconMap
costero-e Jul 10, 2024
de829f3
updated CNV term mapping table
mbaudis Jul 13, 2024
7b44cd5
Merge branch 'main' into schema-urgent-fixes
costero-e Jul 16, 2024
18eff1c
deleting aggregated from Granularity enum
costero-e Jul 16, 2024
556e5b5
deleting aggregated from Granularity description
costero-e Jul 16, 2024
731de0e
Merge pull request #146 from ga4gh-beacon/clean-up
costero-e Jul 16, 2024
de014e8
Merge pull request #82 from ga4gh-beacon/schema-urgent-fixes
costero-e Jul 16, 2024
0cfec9a
Merge branch 'main' into website-docs
costero-e Jul 16, 2024
f6f85c4
Merge pull request #147 from ga4gh-beacon/website-docs
costero-e Jul 16, 2024
bcec830
updated changelog of versions
costero-e Jul 18, 2024
fb34316
updated release date for version 2.1
costero-e Jul 18, 2024
65c2574
Merge pull request #149 from ga4gh-beacon/schema-urgent-fixes_update-…
costero-e Jul 18, 2024
85eb71e
Merge branch 'main' into schema-urgent-fixes
costero-e Jul 18, 2024
1686220
Merge pull request #150 from ga4gh-beacon/schema-urgent-fixes
costero-e Jul 18, 2024
690ee96
Merge branch 'main' into entry-type-definitions-cleanup
jrambla Oct 8, 2024
7e98b1e
Merge pull request #92 from ga4gh-beacon/entry-type-definitions-cleanup
costero-e Oct 8, 2024
1d4730a
Merge branch 'main' into uri-template
costero-e Oct 8, 2024
5ea17fb
Merge pull request #110 from redmitry/uri-template
costero-e Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/mk-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: mk-progenetix-docs
on:
push:
branches:
- website-docs
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: pip install mkdocs-macros-plugin
- run: pip install pymdown-extensions
- run: pip install mkdocs-mermaid2-plugin
- run: pip install mdx_gh_links
- run: mkdocs gh-deploy --force
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ site
.DS_Store
models/.DS_Store
/.vs
docs/schemas-md
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Updated `docs`:
- `filters.md`
- `variant-queries.md`
- `bugs-changes-log.md`
- `changes-todo.md`
- `ComplexValue.md`
- `README.md`
- Added missing descriptions to models properties (see issue #42)
Expand All @@ -34,7 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

* Fixed `POST`queries for `g_variant` (w/ examples)
* Removed 'json' references inside the yaml version (PR [#43] (https://github.com/ga4gh-beacon/beacon-v2/pull/43))
* Removed 'json' references inside the yaml version (PR [#43](https://github.com/ga4gh-beacon/beacon-v2/pull/43))
* added missing `type: object` to `ResultsetInstance` (PR [#82](https://github.com/ga4gh-beacon/beacon-v2/pull/82))

### Deprecated

Expand Down
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This repository is a unified repository representing the different parts of the
* [models](models)
* Beacon v2 Documentation
- authoritive source already in this repository [`/docs`](docs)
- rendered version through [here](https://beacon-project.io/beacon-v2/) (alternative address is [docs.genomebeacons.org](http://docs.genomebeacons.org))
- rendered version through [here](https://beacon-project.io/beacon-v2/) (alternative address is [docs.genomebeacons.org](https://docs.genomebeacons.org))

As with other schema projects, here we separate between the schema source files (in `src`; JSON-Schema written in YAML) and the generated versions for referencing. The current setup allows already the direct referencing of the generated JSON schemas. Examples:

Expand All @@ -28,12 +28,34 @@ As with other schema projects, here we separate between the schema source files

There is a set of tools in [`/bin`](./bin/) to facilitate the conversion. ATM, after editing `...yaml` schema files somewhere in the `/src` tree, a (local) run of `bin/yamlerRunner.sh` - which re-generates the `....json` files in the `/json` tree) has to be performed before pushing changes.

### Changes
### Changelog

* change notes with respect to the repository & documentation are now in [docs.genomebeacons.org](http://docs.genomebeacons.org/bugs-changes-log/)
## 2.1.0

*Released, July, 19, 2024*

* Relocated TypedQuantity required to proper level of the schema for complexValue
* Added end and start entities for ageRange and iso8601duration for age
* Filtering terms scopes changed from string to array of strings

## 2.0.1

*Released July, 16, 2024*

* Replaced ENSGLOSSARY for SO ontology family in documentation examples
* Moved CURIE to beaconCommonComponents
* Created filtering terms entity
* Removed validation directories
* Several fixes to entity types, typos and other non-breaking changes

## 2.0.0

*Released June, 21, 2022*

* change notes with respect to the repository & documentation are now in [docs.genomebeacons.org](https://docs.genomebeacons.org/changes-todo/)
* NOTE: on 2022-06-20 the previous development repositories have been archived:
- ARCHIVE - [beacon-framework-v2](https://github.com/ga4gh-beacon/beacon-framework-v2)
- ARCHIVE - [[beacon-v2-Models](https://github.com/ga4gh-beacon/beacon-v2-Models)
- ARCHIVE - [beacon-v2-Models](https://github.com/ga4gh-beacon/beacon-v2-Models)


## Directory structure
Expand Down
8 changes: 4 additions & 4 deletions bin/SCHEMAS2MD.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ YAMLs schemas. Each time the original MS Word document was edited, someone had t

This script inverts the process, i.e., **it enforces modifying the schema specification directly at the YAML/JSON level**.

Editing the schemas directly at the YAML/JSON level has two advantages, the first is that because we follow [OpenAPI](https://swagger.io/specification/) specification (along with JSON schema), _a priori_ we could use [SWAGGER UI](https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation). The second is that the YAML/JSON files can be converted to Markdown tables in order to create [Markdown based documentation](http://docs.genomebeacons.org) documentation. This script **transforms YAML/JSON to Markdown tables**, including their nested objects **up to a third degree of hierarchy**.
Editing the schemas directly at the YAML/JSON level has two advantages, the first is that because we follow [OpenAPI](https://swagger.io/specification/) specification (along with JSON schema), _a priori_ we could use [SWAGGER UI](https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation). The second is that the YAML/JSON files can be converted to Markdown tables in order to create [Markdown based documentation](https://docs.genomebeacons.org) documentation. This script **transforms YAML/JSON to Markdown tables**, including their nested objects **up to a third degree of hierarchy**.

The **Markdown** format can be directly rendered as tables at the GitHub repository, and it can be used with [MkDocs](https://www.mkdocs.org/) to create [HTML](http://docs.genomebeacons.org) documentation.
The **Markdown** format can be directly rendered as tables at the GitHub repository, and it can be used with [MkDocs](https://www.mkdocs.org/) to create [HTML](https://docs.genomebeacons.org) documentation.

Everytime a `git push` is performed to the [repo](https://github.com/ga4gh-beacon/beacon-v2) the documentation at [Github Pages](http://docs.genomebeacons.org) gets updated. Note that only content under directory `docs/` will make it to [Github Pages](http://docs.genomebeacons.org).
Everytime a `git push` is performed to the [repo](https://github.com/ga4gh-beacon/beacon-v2) the documentation at [Github Pages](https://docs.genomebeacons.org) gets updated. Note that only content under directory `docs/` will make it to [Github Pages](https://docs.genomebeacons.org).

Before creating this tool, the author made an exhaustive search on what had been dveloped by the _community_ to automatically convert YAML/JSON to Markdown tables and found that there were many ways to go from YAML/JSON to HTML (e.g., CPAN, Python, Node.js), but not much from YAML/JSON to Markdown. Obviously, even in the case we had found something, some major tweaking will be needed in order to display things the way we want.

Expand Down Expand Up @@ -132,7 +132,7 @@ _NB:_ The script was built to work with the Beacon v2 Model schemas and the auth

_NB:_ The decission to take YAMLs (and not JSON) as an input is deliberate and made by the author.

_NB:_ The script only processes the `Terms` nested **up to 3 degrees of hierarchy**. Before Adoption of VRS/PHX that limit was OK.
_NB:_ The script only processes the `Terms` nested **up to 3 degrees of hierarchy**. Before Adoption of VRS/PXF that limit was OK.

_NB:_ The script also includes the Beacon v2 Models examples from [beacon-v2 repo](https://github.com/ga4gh-beacon/beacon-v2) in JSON format.

Expand Down
File renamed without changes.
68 changes: 40 additions & 28 deletions bin/beacon_yaml2md.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
#
# Script to convert Beacon v2 Models schemas to Markdown tables
#
# Last Modified: May/05/2022
# Last Modified: Mar/26/2024
#
# Version 2.0.0
#
# Copyright (C) 2021-2022 Manuel Rueda (manuel.rueda@crg.eu)
# Copyright (C) 2021-2024 Manuel Rueda (manuel.rueda@cnag.eu)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -236,6 +236,10 @@ sub yaml2md_obj {
# We parse $yaml to get paths and more...
my ( $base, $dir, $ext ) = fileparse( $yaml, '.yaml' );
$ext =~ s/\.yaml/.md/;

# Ad hoc fix for two files that have same namex except for uc/lc
# AgeRange == ageRange and Value == value on MacOS cwAPFS (Case insensitive)
$base = $base . '_PXF' if ( $base eq 'AgeRange' || $base eq 'Value' );
my $file = catfile( $mo_dir, $base . $ext ); # Note -> $base.$ext
write_file( $file, $out_str );

Expand Down Expand Up @@ -278,11 +282,11 @@ sub yaml_slicer {
# one YAML file for each property and then re-use code from the 'main' schema

##########################################
# **** Note about VRS / PHX adoption *** #
# **** Note about VRS / PXF adoption *** #
##########################################

# The adoption of those standards had technical implications. The script expects objects to have
# <key> for the object and then <properties>. VRS/PHX follow JSON schemas that include /oneOf allOf anyOf/
# <key> for the object and then <properties>. VRS/PXF follow JSON schemas that include /oneOf allOf anyOf/
# plus other complex intructions such as <if:> <else:>.
# This becomes a real challenge with $ref as, for instance, in <g_v.variation> we can not find the key for
# 'MolecularVariation', 'SystemicVariation', 'LegacyVariation'
Expand Down Expand Up @@ -352,7 +356,7 @@ sub yaml_slicer {
sub table_content {

my ( $yaml_properties, $ra_properties, $headers, $obj, $link ) = @_;
my @lc_headers = map { lc } @$headers; # Copy array uc to avoid modifying original $ref
my @lc_headers = map { lc } @$headers; # Copy array uc to avoid modifying original $ref
my $out_str = '';

#---------------------------------------------------------|
Expand Down Expand Up @@ -394,10 +398,10 @@ sub table_content {
if $header eq 'example';

# Slice differentely if $object->{type} eq 'array'
if ($object->{type} eq 'array' ) {
for ('description', 'properties'){
$value_header = $object->{items}{$_} if $header eq $_;
}
if ( $object->{type} eq 'array' ) {
for ( 'description', 'properties' ) {
$value_header = $object->{items}{$_} if $header eq $_;
}
}

# Now convert data structure to string
Expand Down Expand Up @@ -454,7 +458,7 @@ sub ref2str {

# string or undef
else {
$out_str = defined $data->[0] ? join ', ', @$data : 'NA'; # Note ', ' to allow HTML column rendering
$out_str = defined $data->[0] ? join ', ', @$data : 'NA'; # Note ', ' to allow HTML column rendering
}
}
elsif ( ref $data eq 'HASH' ) {
Expand All @@ -480,15 +484,20 @@ sub add_external_links {
my ( $tmp_str, $key ) = @_;

# Note: This is an ad hoc solution to fix errors with deeply-nested data
my @phx = qw( typedQuantities days weeks Quantity high low);
my @vrs = qw(_id state type CURIE Location);
my @pxf = qw( typedQuantities days weeks Quantity high low);
my @vrs = qw(_id state type CURIE Location);
my @framework = ("ontologyTerm");
return ( any { ( $_ eq $key ) } @phx )

return ( any { ( $_ eq $key ) } @pxf )
? "[$key](https://phenopacket-schema.readthedocs.io/en/latest/building-blocks.html)"
: ( any { ( $_ eq $key ) } @vrs )
? "[$key](https://vrs.ga4gh.org/en/stable/terms_and_model.html#$key)"
: ( any { ( $_ eq $key ) } @framework )
? "[$key](https://github.com/ga4gh-beacon/beacon-v2/blob/main/framework/src/common/$key.yaml)"
: ( any { ( $_ eq $key ) } @framework )
? "[$key](https://github.com/ga4gh-beacon/beacon-v2/blob/main/framework/src/common/$key.yaml)"

# NB: Ad hoc solution for properties having equal name (lc)
: ( $key eq 'AgeRange' || $key eq 'Value' )
? "[$key]($tmp_str/${key}_PXF.md)"
: "[$key]($tmp_str/$key.md)";
}

Expand Down Expand Up @@ -582,13 +591,13 @@ sub create_str_yaml {
description: References to the tool
examples:
- bio.toolsId: https://bio.tools/vep
- url: http://www.ensembl.org/vep
- url: https://www.ensembl.org/vep
type: object
EOF

## ontologyTerm.yaml is needed due to a bug with jsonref2json.js that overrided "parent" <description> field

my $str_ontologyTerm = <<EOF;
my $str_ontologyTerm = <<EOF;
---
additionalProperties: true
description: Definition of an ontology term.
Expand Down Expand Up @@ -676,10 +685,10 @@ sub parse_json_keywords {
'variation' =>
[ 'MolecularVariation', 'SystemicVariation', 'LegacyVariation' ],
'SystemicVariation' => ['CopyNumber'],
'MolecularVariation' => [ 'Allele', 'Haplotype' ],
'location' => [ 'CURIE', 'Location' ],
'MolecularVariation' => [ 'Allele', 'Haplotype' ],
'location' => [ 'CURIE', 'Location' ],
'state' => [ 'SequenceState', 'SequenceExpression' ],
'Value' => [ 'Quantity', 'ontologyTerm' ]
'Value' => [ 'Quantity', 'ontologyTerm' ]
};

# We'll be checking <oneOf allOf anyOf>
Expand All @@ -699,14 +708,17 @@ sub parse_json_keywords {
# my $const = $pointer->get("/$keyword/$property/$count/properties/type/const");
# $tmp_hash->{properties}{$const} = $elements;
#} else{
my $tmp_term = ( $pointer->contains("/$keyword/$count/title") && $pointer->get("/$keyword/$count/title") ne 'Ontology Term' )
my $tmp_term =
( $pointer->contains("/$keyword/$count/title")
&& $pointer->get("/$keyword/$count/title") ne
'Ontology Term' )
? $pointer->get("/$keyword/$count/title")
: @{ $terms->{$property} }[$count];
$tmp_hash->{properties}{$tmp_term} = $elements if $tmp_term; # Ad-hoc some terms appear duplicated and come empty....
#}
$tmp_hash->{properties}{$tmp_term} = $elements if $tmp_term; # Ad-hoc some terms appear duplicated and come empty....
#}
$count++;
}
$data = $tmp_hash; # Adding new reference
$data = $tmp_hash; # Adding new reference
}
}
return $data;
Expand Down Expand Up @@ -769,11 +781,11 @@ =head1 MOTIVATION

This script inverts the process, i.e., B<it enforces modifying the schema specification directly at the YAML/JSON level>.

Editing the schemas directly at the YAML/JSON level has two advantages, the first is that because we follow L<OpenAPI|https://swagger.io/specification/> specification (along with JSON schema), I<a priori> we could use L<SWAGGER UI|https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation>. The second is that the YAML/JSON files can be converted to Markdown tables in order to create L<Markdown based documentation|http://docs.genomebeacons.org> documentation. This script B<transforms YAML/JSON to Markdown tables>, including their nested objects B<up to a third degree of hierarchy>.
Editing the schemas directly at the YAML/JSON level has two advantages, the first is that because we follow L<OpenAPI|https://swagger.io/specification/> specification (along with JSON schema), I<a priori> we could use L<SWAGGER UI|https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation>. The second is that the YAML/JSON files can be converted to Markdown tables in order to create L<Markdown based documentation|https://docs.genomebeacons.org> documentation. This script B<transforms YAML/JSON to Markdown tables>, including their nested objects B<up to a third degree of hierarchy>.

The B<Markdown> format can be directly rendered as tables at the GitHub repository, and it can be used with L<MkDocs|https://www.mkdocs.org/> to create L<HTML|http://docs.genomebeacons.org> documentation.
The B<Markdown> format can be directly rendered as tables at the GitHub repository, and it can be used with L<MkDocs|https://www.mkdocs.org/> to create L<HTML|https://docs.genomebeacons.org> documentation.

Everytime a C<git push> is performed to the L<repo|https://github.com/ga4gh-beacon/beacon-v2> the documentation at L<Github Pages|http://docs.genomebeacons.org> gets updated. Note that only content under directory C<docs/> will make it to L<Github Pages|http://docs.genomebeacons.org>.
Everytime a C<git push> is performed to the L<repo|https://github.com/ga4gh-beacon/beacon-v2> the documentation at L<Github Pages|https://docs.genomebeacons.org> gets updated. Note that only content under directory C<docs/> will make it to L<Github Pages|https://docs.genomebeacons.org>.

Before creating this tool, the author made an exhaustive search on what had been dveloped by the I<community> to automatically convert YAML/JSON to Markdown tables and found that there were many ways to go from YAML/JSON to HTML (e.g., CPAN, Python, Node.js), but not much from YAML/JSON to Markdown. Obviously, even in the case we had found something, some major tweaking will be needed in order to display things the way we want.

Expand Down Expand Up @@ -872,7 +884,7 @@ =head1 HOW TO RUN BEACON_YAML2MD

I<NB:> The decission to take YAMLs (and not JSON) as an input is deliberate and made by the author.

I<NB:> The script only processes the C<Terms> nested B<up to 3 degrees of hierarchy>. Before Adoption of VRS/PHX that limit was OK.
I<NB:> The script only processes the C<Terms> nested B<up to 3 degrees of hierarchy>. Before Adoption of VRS/PXF that limit was OK.

I<NB:> The script also includes the Beacon v2 Models examples from L<beacon-v2 repo|https://github.com/ga4gh-beacon/beacon-v2> in JSON format.

Expand Down
2 changes: 1 addition & 1 deletion bin/deref_schemas/datasets/defaultSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
"externalUrl": {
"description": "URL to an external system providing more dataset information (RFC 3986 format).",
"examples": [
"http://example.org/wiki/Main_Page"
"https://example.org/wiki/Main_Page"
],
"type": "string"
},
Expand Down
2 changes: 1 addition & 1 deletion bin/deref_schemas/datasets/defaultSchema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ properties:
externalUrl:
description: URL to an external system providing more dataset information (RFC 3986 format).
examples:
- http://example.org/wiki/Main_Page
- https://example.org/wiki/Main_Page
type: string
id:
description: Unique identifier of the dataset
Expand Down
Loading
Loading