Skip to content
Open

2.x #56

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5f754c6
New file tree for v2; fixes #45 Switch to IETF BCP 47 language tags
tiagosimoes-euf Sep 5, 2025
110536e
Initial review of Programmes; covers #38 #46 #47 #53; impacts #35 #45
tiagosimoes-euf Sep 5, 2025
ec12f06
Adds ELM vocabularies to Programme per #48
tiagosimoes-euf Sep 5, 2025
cf7b93c
Initial review of Courses; covers #26 #49 #50 #51
tiagosimoes-euf Sep 5, 2025
b134476
Refactoring for readability and reusability
tiagosimoes-euf Sep 5, 2025
22bb462
Introduces lastModified field in all resource types
tiagosimoes-euf Sep 8, 2025
23aa225
Simplifies Course meta: no global rule, clearer field name, improved doc
tiagosimoes-euf Sep 8, 2025
727ac03
Tweaks to heiId, abbreviations in HEIs and OUnits
tiagosimoes-euf Sep 8, 2025
66dff4d
Sorts out Links objects as per #35; other minor fixes
tiagosimoes-euf Sep 8, 2025
d82ed92
Prerequisite Course relationship
tiagosimoes-euf Sep 9, 2025
0a87e2f
Includes related programmes in the relationships
tiagosimoes-euf Sep 9, 2025
96a69a5
Adds deprecated flag to Courses as per #36
tiagosimoes-euf Sep 9, 2025
3cbac1d
Missing description for deprecated field
tiagosimoes-euf Sep 9, 2025
a9a2b71
Groups fields and links schemas in subdirs
tiagosimoes-euf Sep 9, 2025
bd4b32b
Fixes a typo
tiagosimoes-euf Sep 9, 2025
52d150b
Rebuilds examples according to the current schema
tiagosimoes-euf Sep 9, 2025
1e744b2
Introduces support for Course instances
tiagosimoes-euf Sep 9, 2025
8697606
Adds Course inherited properties to Instance
tiagosimoes-euf Sep 9, 2025
54b6901
More elements of CourseInstance
tiagosimoes-euf Sep 9, 2025
7a78dc5
Language of instruction is always required
tiagosimoes-euf Sep 10, 2025
cca3fdd
Adds grading scheme and result distribution (EWP Courses)
tiagosimoes-euf Sep 10, 2025
b12edf7
Path review, HTTP headers
tiagosimoes-euf Sep 10, 2025
251fbd2
Consistent field order; ready for first alpha #34
tiagosimoes-euf Sep 10, 2025
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
53 changes: 27 additions & 26 deletions openapi/occapi_v2.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.1.0
info:
version: 2.0.0-dev
version: 2.0.0-alpha
title: Open Course Catalogue API
termsOfService: ''
contact:
Expand All @@ -13,14 +13,11 @@ info:
url: 'https://uni-foundation.eu/wp-content/uploads/2019/04/EUF-1.png'
description:
$ref: ./v2/info-description.md
# externalDocs:
# description: Find out how to create a GitHub repo for your OpenAPI definition.
# url: 'https://github.com/Rebilly/generator-openapi-repo'
tags:
- name: API provider
description: Information about the provider.
- name: API server
description: Information about the server.
- name: Institution
description: Information about the Institutions covered by the provider.
description: Information about the Institutions covered by the server.
- name: Organisational Unit
description: Information about Organisational Units in an Institution.
- name: Programme
Expand All @@ -30,41 +27,45 @@ tags:
Information about Courses offered by an Institution.

_Course_ resources include a JSON:API _meta_ object containing information
about the relation between each Course and all or specific Programmes.
# - name: Tag
about the relation between each Course and specific Programmes.
- name: Course instance
description: |
Information about instances of Courses offered by an Institution.

_Course instance_ resources are directly linked to _Course_ resources.
servers:
- url: '/occapi/v2'
description: Sandbox server (example data)
paths:
/:
$ref: paths/root.yaml
$ref: v2/paths/root.yaml
# Institution & Organisational Unit endpoints.
/hei:
$ref: paths/hei.yaml
$ref: v2/paths/hei.yaml
'/hei/{heiId}':
$ref: 'paths/hei@{heiId}.yaml'
$ref: 'v2/paths/hei@{heiId}.yaml'
'/hei/{heiId}/ounit':
$ref: 'paths/ounit.yaml'
$ref: 'v2/paths/ounit.yaml'
'/hei/{heiId}/ounit/{id}':
$ref: 'paths/ounit@{id}.yaml'
$ref: 'v2/paths/ounit@{id}.yaml'
# Programme endpoints.
'/hei/{heiId}/programme':
$ref: 'paths/programme.yaml'
$ref: 'v2/paths/programme.yaml'
'/hei/{heiId}/ounit/{id}/programme':
$ref: 'paths/ounit@{id}-programme.yaml'
$ref: 'v2/paths/ounit@{id}-programme.yaml'
'/hei/{heiId}/programme/{id}':
$ref: 'paths/programme@{id}.yaml'
$ref: 'v2/paths/programme@{id}.yaml'
# Course endpoints.
'/hei/{heiId}/course':
$ref: 'paths/course.yaml'
$ref: 'v2/paths/course.yaml'
'/hei/{heiId}/ounit/{id}/course':
$ref: 'paths/ounit@{id}-course.yaml'
$ref: 'v2/paths/ounit@{id}-course.yaml'
'/hei/{heiId}/programme/{id}/course':
$ref: 'paths/programme@{id}-course.yaml'
$ref: 'v2/paths/programme@{id}-course.yaml'
'/hei/{heiId}/course/{id}':
$ref: 'paths/course@{id}.yaml'
# Exanples
# '/path':
# $ref: 'paths/path-item.yaml'
# '/path/example':
# $ref: 'paths/path-item-with-examples.yaml'
$ref: 'v2/paths/course@{id}.yaml'
# Course instance endpoints.
'/hei/{heiId}/course/{id}/instance':
$ref: 'v2/paths/course@{id}-instance.yaml'
'/hei/{heiId}/instance/{id}':
$ref: 'v2/paths/instance@{id}.yaml'
14 changes: 14 additions & 0 deletions openapi/v2/components/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Reusable components
===========

* You can create the following folders here:
- `schemas` - reusable [Schema Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject)
- `responses` - reusable [Response Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject)
- `parameters` - reusable [Parameter Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject)
- `examples` - reusable [Example Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject)
- `headers` - reusable [Header Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#headerObject)
- `requestBodies` - reusable [Request Body Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#requestBodyObject)
- `links` - reusable [Link Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#linkObject)
- `callbacks` - reusable [Callback Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#callbackObject)
- `securitySchemes` - reusable [Security Scheme Objects](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#securitySchemeObject)
* Filename of files inside the folders represent component name, e.g. `Customer.yaml`
4 changes: 4 additions & 0 deletions openapi/v2/components/headers/ExpiresAfter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
description: date in UTC when token expires
schema:
type: string
format: date-time
76 changes: 76 additions & 0 deletions openapi/v2/components/responses/CourseCollection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
jsonapi:
version: "1.1"
meta:
links:
self:
href: "http://jsonapi.org/format/1.1/"
data:
- type: course
id: aabbccdd-eeff-1122-3344-556677889900
attributes:
title:
- string: Example Course
lang: en
code: COUR01
ects: 7.5
academicTerm:
- '1/2'
description:
- multiline: |
This is the description of the Course.

This is a long text field.
lang: en
elmAssessmentType:
- 3484bd7e51
- d30284d7df
- 6e6cb2cc78
elmLearningActivityType:
- ff436ea7c9
- 3c8bd58d62
elmLearningOpportunityType:
- 05053c1cbe
elmModeOfLearning:
- e92d221e4d
iscedCode:
- '0000'
languageOfInstruction:
- en
learningOutcomes:
- multiline: |
These are the learning outcomes of the Course.

This is a long text field.
lang: en
localClassification:
- classificationSystem: 'erasmus'
classificationValue: '00.0'
restrictedToLocalStudents: false
restrictedToAllianceStudents: true
url:
- uri: www.domain.tld/example/course
lang: en
lastModified: 2025-09-01T12:00:00Z
deprecated: false
meta:
relatedProgramme:
- programmeId: abcdef12-3456-7890-abcd-ef1234567890
mandatoryCourse: true
year: '1/2'
relationships:
prerequisiteCourse: []
relatedProgramme:
- data:
type: programme
id: abcdef12-3456-7890-abcd-ef1234567890
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/programme/abcdef12-3456-7890-abcd-ef1234567890'
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/course/aabbccdd-eeff-1122-3344-556677889900'
instance:
href: 'http://example.com/occapi/v2/hei/domain.tld/course/aabbccdd-eeff-1122-3344-556677889900/instance'
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/course'
25 changes: 25 additions & 0 deletions openapi/v2/components/responses/CourseInstanceCollection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
jsonapi:
version: "1.1"
meta:
links:
self:
href: "http://jsonapi.org/format/1.1/"
data:
- type: instance
id: 13579bdf-0246-8ace-1357-9bdf02468ace
attributes:
lastModified: 2025-09-01T12:00:00Z
relationships:
course:
data:
type: course
id: aabbccdd-eeff-1122-3344-556677889900
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/course/aabbccdd-eeff-1122-3344-556677889900'
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/instance/13579bdf-0246-8ace-1357-9bdf02468ace'
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/course/aabbccdd-eeff-1122-3344-556677889900/instance'
42 changes: 42 additions & 0 deletions openapi/v2/components/responses/CourseInstanceResource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
jsonapi:
version: "1.1"
meta:
links:
self:
href: "http://jsonapi.org/format/1.1/"
data:
type: instance
id: 13579bdf-0246-8ace-1357-9bdf02468ace
attributes:
startDate: 2025-02-01
endDate: 2025-06-30
academicTermId: 2025/2026-2/2
ects: 7.5
elmAssessmentType:
- 3484bd7e51
- 6e6cb2cc78
elmLearningActivityType:
- ff436ea7c9
- 3c8bd58d62
elmLearningOpportunityType:
- 05053c1cbe
elmModeOfLearning:
- e92d221e4d
engagementHours: 42
languageOfInstruction:
- en
lastModified: 2025-09-01T12:00:00Z
relationships:
course:
data:
type: course
id: aabbccdd-eeff-1122-3344-556677889900
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/course/aabbccdd-eeff-1122-3344-556677889900'
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/instance/13579bdf-0246-8ace-1357-9bdf02468ace'
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/instance/13579bdf-0246-8ace-1357-9bdf02468ace'
112 changes: 112 additions & 0 deletions openapi/v2/components/responses/CourseResource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
jsonapi:
version: "1.1"
meta:
links:
self:
href: "http://jsonapi.org/format/1.1/"
data:
type: course
id: aabbccdd-eeff-1122-3344-556677889900
attributes:
title:
- string: Example Course
lang: en
code: COUR01
ects: 7.5
academicTerm:
- '1/2'
description:
- multiline: |
This is the description of the Course.

This is a long text field.
lang: en
elmAssessmentType:
- 3484bd7e51
- d30284d7df
- 6e6cb2cc78
elmLearningActivityType:
- ff436ea7c9
- 3c8bd58d62
elmLearningOpportunityType:
- 05053c1cbe
elmModeOfLearning:
- e92d221e4d
iscedCode:
- '0000'
languageOfInstruction:
- en
learningOutcomes:
- multiline: |
These are the learning outcomes of the Course.

This is a long text field.
lang: en
localClassification:
- classificationSystem: 'erasmus'
classificationValue: '00.0'
restrictedToLocalStudents: false
restrictedToAllianceStudents: true
url:
- uri: www.domain.tld/example/course
lang: en
bibliography:
- multiline: |
This is the bibliography of the Course.

This is a long text field.
lang: en
courseContent:
- multiline: |
this is the content outline of the Course.

This is a long text field.
lang: en
prerequisites:
- multiline: |
These are the prerequisites of the Course.

This is a long text field.
lang: en
courseAvailability:
- multiline: |
These are other factors impacting enrollment in the Course.

This is a long text field.
lang: en
teachingMethod:
- multiline: |
This is the teaching method for the Course.

This is a long text field.
lang: en
assessmentMethod:
- multiline: |
This is the assessment method for the Course.

This is a long text field.
lang: en
lastModified: 2025-09-01T12:00:00Z
deprecated: false
meta:
relatedProgramme:
- programmeId: abcdef12-3456-7890-abcd-ef1234567890
mandatoryCourse: true
year: '1/2'
relationships:
prerequisiteCourse: []
relatedProgramme:
- data:
type: programme
id: abcdef12-3456-7890-abcd-ef1234567890
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/programme/abcdef12-3456-7890-abcd-ef1234567890'
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/course/aabbccdd-eeff-1122-3344-556677889900'
instance:
href: 'http://example.com/occapi/v2/hei/domain.tld/course/aabbccdd-eeff-1122-3344-556677889900/instance'
links:
self:
href: 'http://example.com/occapi/v2/hei/domain.tld/course/aabbccdd-eeff-1122-3344-556677889900'
9 changes: 9 additions & 0 deletions openapi/v2/components/responses/EndpointNotAvailable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
jsonapi:
version: "1.1"
meta:
links:
self:
href: "http://jsonapi.org/format/1.1/"
errors:
- status: "404"
title: Endpoint not available.
Loading