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

Changes in License applyed #5

Merged
merged 24 commits into from
May 17, 2024
Merged

Changes in License applyed #5

merged 24 commits into from
May 17, 2024

Conversation

MaxThomasHPI
Copy link
Contributor

  • as discussed, there were problems/inconsistencies in the License object
  • updated to the latest version
  • documentation was aligned -> description attribute in the schema updated
  • removed outdated uml diagrams
  • please check!

MaxThomasHPI and others added 2 commits February 12, 2024 10:27
- documentation aligned (description in the attributes)
- added clarification about general license according to spdx and specific license
@MrSerth
Copy link
Member

MrSerth commented Feb 12, 2024

Thanks for working on these changes. I'll leave it to @Dome-GER and @cwillems to have a detailed look. Just two remarks ahead:

  • You've renamed the JSON schema from moochub-schema.json to moochub_schema.json. Is this change intended? Currently, Git tracks these two files as unrelated, meaning that one file is deleted and another (new one) is added. Hence, comparing the differences is very tedious on GitHub.
  • You've saved the JSON schema, just converted from JSON syntax to YAML syntax, in the moochub-api.v3.yml. Therewith, the file no longer describes the API (as suggested by the name), but "just" the format of the response body. Hence, it means the moochub-api.v3.yml is becoming a real duplicate of the moochub_schema.json without added value.

PS: Feel free to adjust the commit message [especially the second one] to provide a better overview of the changes. Here are some thoughts on writing good commit messages.

Copy link
Contributor

@Dome-GER Dome-GER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super hard to review. I think this needs a review of the new files without comparison.
Or what is your recommendation?

Why is the general schema quite different? I think this is related to Sebastian's second point.

moochub-api.v3.yml Outdated Show resolved Hide resolved
The former yml file was just a translation of the json schema. Now the
yml file describes the whole API. Information about pagination was
missing as well as HTTP error messages.

yml file had the wrong indention in arrays. Fixing this improved
readability.

There was a naming error calling the MOOChub schema "moochub_schema.json"
instead of "moochub-schema.json". This caused problems in matching the
correct files in the github repository.
@MrSerth
Copy link
Member

MrSerth commented Feb 16, 2024

Thanks, it's getting easier to compare the changes. Still, I have a few remarks:

  • Would you mind using the same indention level in the JSON file and the same representation for strings (with or without single quotes) in the YAML file or extract these changes to another commit / PR? Currently, those changes are all highlighted (as seen in the diff), which makes it more difficult to compare.
  • Further, I noticed that the $schema reference given in the JSON might not be standard-compliant. Could you please double-check that?

@MaxThomasHPI
Copy link
Contributor Author

have just recently found another error in my pull request, will take a look at these new comments afterward.

speaking of $schema: is this about the missing "#" at the end of the link as discussed?

There was a mistake that "instructor" was not an array. This was in
contradiction to the defined schema.
@MrSerth
Copy link
Member

MrSerth commented Feb 16, 2024

speaking of $schema: is this about the missing "#" at the end of the link as discussed?

Potentially, yes. However, it seems to depend on the specific schema version used; the newer ones do not include the # any longer. Hence, I really suggest double-checking with the upstream documentation. This page contains the actual specifications, linking to the respective "JSON Schema meta-schema" for each version. Besides the #, there are differences in the protocol used (http vs https) depending on the version.

There were some spaces in the honorific prefix missing in some
descriptions and examples. This was a clear mistake and made
reviewing changes unnecessary harder.
There was a problem that with generating the yml file by a
script the quotation marks were sometimes missing in the yml.
This caused a lot of trouble in reviewing changes in the
file, since all missing quotation marks were treated as
changes.

The script was updated and the file shows quotation marks now
where needed.
The affiliation in the instructor attribute was wrongly
indented. It was part of the image attribute. By correcting
the indention the affiliation is now part of the Person
object in the instructor attribute as intended.
@MrSerth
Copy link
Member

MrSerth commented Feb 16, 2024

Just another remark: All URLs pointing to https://openhpi.azureedge.net are no longer valid, since we are stopped using this host to deliver assets.

@MaxThomasHPI
Copy link
Contributor Author

ok, is this relevant? Should only be an issue with the images, and they are just examples? Could also e something like: www.example.com/image.png?

@MrSerth
Copy link
Member

MrSerth commented Feb 16, 2024

ok, is this relevant?

Well, it doesn't make the example easier to understand nor complete. Maybe it's just something for a dedicated ticket / PR? The smaller each ticket and the corresponding PR is, the easier (and faster!) they are to review 😉.

[...] they are just examples?

Yes, and they serve the purpose to illustrate with valid examples how an entry could look like (at least that's how I would argue).

moochub-schema.json Outdated Show resolved Hide resolved
There were some problems with data types of attributes.
Namely, some attributes can have a value of a defined type
or can be 'null'. In yml this was represented as an array.
As it is in the json. For consistency, the yml will now
only show the data type in the type attribute and has a
nullable attribute as before.

There were still issues with quotation marks that showed
changes where are none.

In the older version, empty attributes contained the value
'null'. This will be the case also for the newer version.
This way, no unnecessary tracking of changes occurs.
A few discrepancies to the old file were detected and they
are only of cosmetic nature. These were fixed to allow for
better comparability of real changes in the yml file.
Another alignment to fit the od style to avoid
unnecessary change tracking.
The repeatFrequency contained the following
attributes which should be on the same level
as repeateFrequency. The mistake is corrected
to fit the intended schema.

This is also removing some validation errors.
The LearningItem object in the hasPart attribute had a
mistake. The required attribute was on the wrong level.
Correction of will make the attribute hasPart work as
expected again.

This also erases a validation error in the yml file.
There was a problem in the "Problem" part of the yml file.
the required attribute as well as readOnly and x-examples
were at the wrong level.

Fixing this erases validation errors in the yml file and
leads to fewer unwanted changes to be tracked.

Also corrects a mistake that tags now is an array as
intended.
The indention of the old file and the new version were
different. This made it impossible to track changes.
The level the data object was stored in the JSON schema was
wrong. Now the data is stored as intended at the same level
as the links.
The There was a problem that the license attribute contained
an array of arrays of License objects. Intended is to have
the license attribute of the course storing an array of License
objects.
The There was a problem that the educationalLevel attribute
did not contain an array of EducationalLevel objects. Intended
is to have the educationalLevel attribute of the course storing
an array of EducationalLevel objects.
@MaxThomasHPI
Copy link
Contributor Author

speaking of $schema: is this about the missing "#" at the end of the link as discussed?

Potentially, yes. However, it seems to depend on the specific schema version used; the newer ones do not include the # any longer. Hence, I really suggest double-checking with the upstream documentation. This page contains the actual specifications, linking to the respective "JSON Schema meta-schema" for each version. Besides the #, there are differences in the protocol used (http vs https) depending on the version.

It seems like draft 7 has the # at the end and uses http. Schould we go for the latest version 2020-12? in this case, there is no # and the protocoll would be https...

@MrSerth
Copy link
Member

MrSerth commented May 16, 2024

speaking of $schema: is this about the missing "#" at the end of the link as discussed?

Potentially, yes. However, it seems to depend on the specific schema version used; the newer ones do not include the # any longer. Hence, I really suggest double-checking with the upstream documentation. This page contains the actual specifications, linking to the respective "JSON Schema meta-schema" for each version. Besides the #, there are differences in the protocol used (http vs https) depending on the version.

It seems like draft 7 has the # at the end and uses http. Schould we go for the latest version 2020-12? in this case, there is no # and the protocoll would be https...

I don’t mind, feel free to use the latest version. In that case, however, you should also check for potential changes.

The example is now matching the identifier and is pointing
at the respective spdx url. It complies to the rules set in
the description now.
Before the change the link pointed at images on the azure
server and are not valid any longer. The new links are
working and point an existing image that is reachable.
The changes could not be reviewed because of too many
changes. The referencing style is now again like in the
former version.

There still seems to be an advantage in outsourcing
repeating parts in extra files.
Only minor changes were made. The functionality
was not altered. The change is mainly for
solving inconveniences, update examples, ...
@MaxThomasHPI MaxThomasHPI merged commit a2ce472 into MOOChub:main May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants