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) { 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; } diff --git a/hpi/cloud/course/v1test/course.proto b/hpi/cloud/course/v1test/course.proto index 9b630fe..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; } @@ -59,7 +59,7 @@ message Semester { Term term = 2; // Required. The year. - sint64 year = 3; + int32 year = 3; } // A course. @@ -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). diff --git a/hpi/cloud/food/v1test/restaurant.proto b/hpi/cloud/food/v1test/restaurant.proto index 614c1a9..0d84645 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; + // The counter where this item is served. + string counter = 4; + + // 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 = 4; + string title = 6; - // Optional. An optional substitution that's offered to the hungry consumer. - string substitution = 5; + // IDs of the labels of the item. + repeated string label_ids = 7; - // Required. The price to pay for this item. - google.type.Money price = 6; + message Substitution { + string title = 1; - // Optional. The counter where this item is served. - string counter = 7; + repeated string label_ids = 2; + } - // Optional. IDs of the labels of the item. - repeated string label_ids = 8; + // An optional substitution that's offered to the hungry consumer. + Substitution substitution = 8; } // A label on a menu item. diff --git a/hpi/cloud/myhpi/v1test/info_bit.proto b/hpi/cloud/myhpi/v1test/info_bit.proto index 0490ce0..885e140 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,18 +29,21 @@ 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; } message Text { - // Required. The text to show. + // Required. The text to show (HTML). string content = 1; } oneof type { - Link link = 3; - Text text = 4; + Link link = 4; + Text text = 5; } } diff --git a/hpi/cloud/news/v1test/article.proto b/hpi/cloud/news/v1test/article.proto index dbfa5b1..df58079 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; @@ -12,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. @@ -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. @@ -54,8 +55,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 +67,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 +76,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; 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;