From 9660cf48f722107e9b292018419782ef8cbb835c Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 12:28:50 +0200 Subject: [PATCH 01/13] fix(news): rename Source, Category, Tag name to title --- hpi/cloud/news/v1test/article.proto | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hpi/cloud/news/v1test/article.proto b/hpi/cloud/news/v1test/article.proto index dbfa5b1..bffcc2d 100644 --- a/hpi/cloud/news/v1test/article.proto +++ b/hpi/cloud/news/v1test/article.proto @@ -54,8 +54,8 @@ message Source { // Required, output only. The unique ID of this source. string id = 1; - // Required. The name of this source. - string name = 2; + // Required. The title of this source. + string title = 2; // Required. The url of this source. string link = 3; @@ -66,8 +66,8 @@ message Category { // Required, output only. The unique ID of this category. string id = 1; - // Required. The name of this category. - string name = 2; + // Required. The title of this category. + string title = 2; } // A tag by which articles can be organized and filtered. @@ -75,8 +75,8 @@ message Tag { // Required, output only. The unique ID of this tag. string id = 1; - // Required. The name of this tag. - string name = 2; + // Required. The title of this tag. + string title = 2; // Required. The number of articles tagged with this tag. uint32 article_count = 3; From dc7229aedf4f3a4f66c824494a46f41fc8a7303d Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 12:43:21 +0200 Subject: [PATCH 02/13] fix(course): make CourseDetail teletask + description optional --- hpi/cloud/course/v1test/course.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hpi/cloud/course/v1test/course.proto b/hpi/cloud/course/v1test/course.proto index 9b630fe..bc3b57e 100644 --- a/hpi/cloud/course/v1test/course.proto +++ b/hpi/cloud/course/v1test/course.proto @@ -76,10 +76,10 @@ message Course { // Required. The lecturer. string lecturer = 4; - // Optional. The assistants. + // The assistants. repeated string assistants = 5; - // Optional. A website that contains more information about the course. + // A website that contains more information about the course. string website = 6; } @@ -88,7 +88,7 @@ message CourseDetail { // Required. The unique ID of course these details belong to. string course_id = 1; - // Required. A link to the course on teletask. + // A link to the course on teletask. string teletask = 2; message ProgramList { @@ -98,7 +98,7 @@ message CourseDetail { // Required. Programs this course can be graded in. map programs = 3; - // Required. A description (HTML). + // A description (HTML). string description = 4; // Requirements to participate in this course (HTML). From d16aa9d9093c4e542b4dbbdf3b22fec12e2a3f49 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 12:57:06 +0200 Subject: [PATCH 03/13] fix(news): make Article.view_count nullable --- hpi/cloud/news/v1test/article.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hpi/cloud/news/v1test/article.proto b/hpi/cloud/news/v1test/article.proto index bffcc2d..d76967e 100644 --- a/hpi/cloud/news/v1test/article.proto +++ b/hpi/cloud/news/v1test/article.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package hpi.cloud.news.v1test; import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; import "hpi/cloud/common/v1test/image.proto"; option java_multiple_files = true; @@ -46,7 +47,7 @@ message Article { repeated Tag tags = 11; // The number of times this article was viewed. - uint32 view_count = 12; + google.protobuf.UInt32Value view_count = 12; } // An article source, e.g. HPI News or HPImgzn. From dd0119da8ef6cb1262343efc19a57cc210337864 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 13:21:00 +0200 Subject: [PATCH 04/13] fix(news): rename remaining site occurrences to source --- hpi/cloud/news/v1test/article.proto | 2 +- hpi/cloud/news/v1test/news_service.proto | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hpi/cloud/news/v1test/article.proto b/hpi/cloud/news/v1test/article.proto index d76967e..df58079 100644 --- a/hpi/cloud/news/v1test/article.proto +++ b/hpi/cloud/news/v1test/article.proto @@ -13,7 +13,7 @@ option java_package = "de.hpi.cloud.news.v1test"; // A news article, e.g. from HPI News and HPImgzn. message Article { - // Required, output only. The unique ID (across sites) of this article. + // Required, output only. The unique ID (across sources) of this article. string id = 1; // Required. ID of the original source of this article. diff --git a/hpi/cloud/news/v1test/news_service.proto b/hpi/cloud/news/v1test/news_service.proto index 89ae117..c7d6850 100644 --- a/hpi/cloud/news/v1test/news_service.proto +++ b/hpi/cloud/news/v1test/news_service.proto @@ -40,8 +40,8 @@ service NewsService { // Request message for listing articles using [ListArticles][hpi.cloud.news.v1test.NewsService.ListArticles]. message ListArticlesRequest { - // If specified, only articles from this site are returned. - string site_id = 1; + // If specified, only articles from this source are returned. + string source_id = 1; // If specified, only articles from this category are returned. string category_id = 2; From 31f39e0e36a6e1016328ac4a80760c7c5e5854b5 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 13:26:05 +0200 Subject: [PATCH 05/13] fix(course): make Semester.year an int32 --- hpi/cloud/course/v1test/course.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hpi/cloud/course/v1test/course.proto b/hpi/cloud/course/v1test/course.proto index bc3b57e..03360d3 100644 --- a/hpi/cloud/course/v1test/course.proto +++ b/hpi/cloud/course/v1test/course.proto @@ -59,7 +59,7 @@ message Semester { Term term = 2; // Required. The year. - sint64 year = 3; + int32 year = 3; } // A course. From 0de78b7b3942c5506a24d1159fd6c99f8d4614f7 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 13:34:31 +0200 Subject: [PATCH 06/13] feat(myhpi): add Action.icon --- hpi/cloud/myhpi/v1test/info_bit.proto | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hpi/cloud/myhpi/v1test/info_bit.proto b/hpi/cloud/myhpi/v1test/info_bit.proto index 0490ce0..5937584 100644 --- a/hpi/cloud/myhpi/v1test/info_bit.proto +++ b/hpi/cloud/myhpi/v1test/info_bit.proto @@ -17,7 +17,7 @@ message InfoBit { // Required. The description. string description = 3; - // Optional. IDs of the actions of this info bit. + // IDs of the actions of this info bit. repeated string action_ids = 4; } @@ -29,6 +29,9 @@ message Action { // Required. The title. string title = 2; + // The URL pointing to an icon. + string icon = 3; + message Link { // Required. The URL. string url = 1; @@ -40,7 +43,7 @@ message Action { } oneof type { - Link link = 3; - Text text = 4; + Link link = 4; + Text text = 5; } } From 3fe408c47bff7cb89791950d92ded4d8470117ed Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 13:43:55 +0200 Subject: [PATCH 07/13] docs(myhpi): document that Action.Text.content can be HTML --- hpi/cloud/myhpi/v1test/info_bit.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hpi/cloud/myhpi/v1test/info_bit.proto b/hpi/cloud/myhpi/v1test/info_bit.proto index 5937584..885e140 100644 --- a/hpi/cloud/myhpi/v1test/info_bit.proto +++ b/hpi/cloud/myhpi/v1test/info_bit.proto @@ -38,7 +38,7 @@ message Action { } message Text { - // Required. The text to show. + // Required. The text to show (HTML). string content = 1; } From c13616984d6388da7664e9f8a1aaa4c0d65201be Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 13:52:11 +0200 Subject: [PATCH 08/13] fix(course): make CourseSeries more strict --- hpi/cloud/course/v1test/course.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hpi/cloud/course/v1test/course.proto b/hpi/cloud/course/v1test/course.proto index 03360d3..7f5116b 100644 --- a/hpi/cloud/course/v1test/course.proto +++ b/hpi/cloud/course/v1test/course.proto @@ -31,7 +31,7 @@ message CourseSeries { // Required. Whether it's mandatory to particiapte in a course of this series. bool mandatory = 7; - // The language courses of this series are taught in. Must be a valid [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) language tag. + // Required. The language courses of this series are taught in. Must be a valid [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) language tag. string language = 8; enum Type { @@ -41,7 +41,7 @@ message CourseSeries { EXERCISE = 3; } - // Types of this course series. + // Types of this course series. Must contain at least one value. repeated Type types = 9; } From e25954d40b7964328218464da36ec8f3724573c2 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 14:05:40 +0200 Subject: [PATCH 09/13] feat(common): add Image.aspect_ratio --- hpi/cloud/common/v1test/image.proto | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hpi/cloud/common/v1test/image.proto b/hpi/cloud/common/v1test/image.proto index f5dc7da..b140041 100644 --- a/hpi/cloud/common/v1test/image.proto +++ b/hpi/cloud/common/v1test/image.proto @@ -9,13 +9,12 @@ option java_package = "de.hpi.cloud.common.v1test"; // An image including source and alt-text for accessibility. message Image { - // Required. - // - // The source (URL) of this image. + // Required. The source (URL) of this image. string source = 1; - // Optional. - // // Alternative text describing the contents of this image. string alt = 2; + + // The aspect ratio. Useful for showing a placeholder with the correct size. + float aspect_ratio = 3; } From 245fc3b36943190bd70270efac3f85abfd4580d4 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 14:10:36 +0200 Subject: [PATCH 10/13] docs(food): remove unnecessary optional comments --- hpi/cloud/food/v1test/restaurant.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hpi/cloud/food/v1test/restaurant.proto b/hpi/cloud/food/v1test/restaurant.proto index 614c1a9..40d72a7 100644 --- a/hpi/cloud/food/v1test/restaurant.proto +++ b/hpi/cloud/food/v1test/restaurant.proto @@ -32,16 +32,16 @@ message MenuItem { // Required. The title. string title = 4; - // Optional. An optional substitution that's offered to the hungry consumer. + // An optional substitution that's offered to the hungry consumer. string substitution = 5; // Required. The price to pay for this item. google.type.Money price = 6; - // Optional. The counter where this item is served. + // The counter where this item is served. string counter = 7; - // Optional. IDs of the labels of the item. + // IDs of the labels of the item. repeated string label_ids = 8; } From 5465385f3b5c2f5db3d3b8ae0aa862402a9e2415 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 14:18:21 +0200 Subject: [PATCH 11/13] feat(food): add details to substitution --- hpi/cloud/food/v1test/restaurant.proto | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/hpi/cloud/food/v1test/restaurant.proto b/hpi/cloud/food/v1test/restaurant.proto index 40d72a7..54b9b0f 100644 --- a/hpi/cloud/food/v1test/restaurant.proto +++ b/hpi/cloud/food/v1test/restaurant.proto @@ -29,20 +29,26 @@ message MenuItem { // Required. The date of when this menu was/will be served. google.type.Date date = 3; - // Required. The title. - string title = 4; - - // An optional substitution that's offered to the hungry consumer. - string substitution = 5; + // The counter where this item is served. + string counter = 4; // Required. The price to pay for this item. - google.type.Money price = 6; + google.type.Money price = 5; - // The counter where this item is served. - string counter = 7; + // Required. The title. + string title = 6; // IDs of the labels of the item. - repeated string label_ids = 8; + repeated string label_ids = 7; + + message Substitution { + string title = 1; + + repeated string label_ids = 2; + } + + // An optional substitution that's offered to the hungry consumer. + Substitution substitution = 8; } // A label on a menu item. From b9ca373db4a56003c061bd9abd29091b574550d4 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 14:23:05 +0200 Subject: [PATCH 12/13] feat(food): support different prices for different customers --- hpi/cloud/food/v1test/restaurant.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hpi/cloud/food/v1test/restaurant.proto b/hpi/cloud/food/v1test/restaurant.proto index 54b9b0f..0d84645 100644 --- a/hpi/cloud/food/v1test/restaurant.proto +++ b/hpi/cloud/food/v1test/restaurant.proto @@ -32,8 +32,8 @@ message MenuItem { // The counter where this item is served. string counter = 4; - // Required. The price to pay for this item. - google.type.Money price = 5; + // Required. The price to pay for this item, depending on the customer (e.g. student, guest, default ...). + map prices = 5; // Required. The title. string title = 6; From 2f5ff9028c917c2f8beefa55a8bfbec8d222f7cd Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Sun, 18 Aug 2019 14:38:31 +0200 Subject: [PATCH 13/13] chore: prepare release --- .unicornfig.yml | 2 +- CHANGELOG.md | 22 +++++++++++++++++++++- build.gradle | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.unicornfig.yml b/.unicornfig.yml index e62f062..391f80d 100644 --- a/.unicornfig.yml +++ b/.unicornfig.yml @@ -7,5 +7,5 @@ description: "This repository contains the original interface definitions of pub \ definitions can provide a better understanding of HPI Cloud APIs and help you\ \ to utilize them more efficiently. You can also use these definitions with open\ \ source tools to generate client libraries, documentation, and other artifacts." -version: "0.0.4" +version: "0.0.5" githubName: "HPI-de/hpi-cloud-apis" diff --git a/CHANGELOG.md b/CHANGELOG.md index e03340c..bdf759c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.0.5] - 2019-08-18 +### BREAKING CHANGES +- **course:** make CourseSeries more strict +- **course:** make CourseDetail teletask + description optional +- **food:** add details to substitution +- **food:** support different prices for different customers +- **news:** rename Source, Category, Tag name to title +- **news:** make Article.view_count nullable +- **news:** rename remaining site occurrences to source +- **news:** make Semester.year an int32 + +### Added +- **common:** add Image.aspect_ratio +- **myhpi:** add Action.icon + +### Documentation +- **myhpi:** document that Action.Text.content can be HTML +- **food:** remove unnecessary optional comments + ## [0.0.4] - 2019-08-12 ### Added - add documentation on how to generate Dart code @@ -42,7 +61,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. Initial release with NewsService. -[Unreleased]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.4...dev +[Unreleased]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.5...dev +[0.0.5]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.4...0.0.5 [0.0.4]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.3...0.0.4 [0.0.3]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.2...0.0.3 [0.0.2]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.1...0.0.2 diff --git a/build.gradle b/build.gradle index a9370d2..ba749a1 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ ext { githubReleaseNotes = 'CHANGELOG.md' allLicenses = ["Apache-2.0"] - libraryVersion = "0.0.4" + libraryVersion = "0.0.5" } task sourcesJar(type: Jar, dependsOn: classes) {