From 8eebefdfeb444c1d95e8ab07a6480fd4075141be Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Thu, 14 Nov 2019 16:18:47 +0100 Subject: [PATCH 1/4] ci: fix travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4d0d798..4d90ea8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: java +dist: trusty install: true services: From 3838cd00564a2086fe73dc6cf0c344b22ca861b7 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Thu, 14 Nov 2019 17:19:11 +0100 Subject: [PATCH 2/4] feat(common, course, myhpi, news): support different content types --- hpi/cloud/common/v1test/markup_content.proto | 18 ++++++++++++++ hpi/cloud/course/v1test/course.proto | 25 ++++++++++---------- hpi/cloud/myhpi/v1test/info_bit.proto | 9 +++---- hpi/cloud/news/v1test/article.proto | 5 ++-- 4 files changed, 39 insertions(+), 18 deletions(-) create mode 100644 hpi/cloud/common/v1test/markup_content.proto diff --git a/hpi/cloud/common/v1test/markup_content.proto b/hpi/cloud/common/v1test/markup_content.proto new file mode 100644 index 0000000..80d4a21 --- /dev/null +++ b/hpi/cloud/common/v1test/markup_content.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package hpi.cloud.common.v1test; + +option java_multiple_files = true; +option java_outer_classname = "MarkupContentProto"; +option java_package = "de.hpi.cloud.common.v1test"; + + +// Text in a markup format. +message MarkupContent { + // Required. A MIME-type describing the content. Clients should support + // text/html and text/markdown. + string type = 1; + + // Required. The actual content. + string content = 2; +} diff --git a/hpi/cloud/course/v1test/course.proto b/hpi/cloud/course/v1test/course.proto index ebf3732..6e12fe4 100644 --- a/hpi/cloud/course/v1test/course.proto +++ b/hpi/cloud/course/v1test/course.proto @@ -4,6 +4,7 @@ package hpi.cloud.course.v1test; import "google/protobuf/wrappers.proto"; import "google/type/date.proto"; +import "hpi/cloud/common/v1test/markup_content.proto"; option java_multiple_files = true; option java_outer_classname = "CourseProto"; @@ -114,21 +115,21 @@ message CourseDetail { // Required. Programs this course can be graded in. map programs = 3; - // A description (HTML). - string description = 4; + // A description. + hpi.cloud.common.v1test.MarkupContent description = 4; - // Requirements to participate in this course (HTML). - string requirements = 5; + // Requirements to participate in this course. + hpi.cloud.common.v1test.MarkupContent requirements = 5; - // What you'll learn by participating in this course (HTML). - string learning = 6; + // What you'll learn by participating in this course. + hpi.cloud.common.v1test.MarkupContent learning = 6; - // Which and how many exams take place (HTML). - string examination = 7; + // Which and how many exams take place. + hpi.cloud.common.v1test.MarkupContent examination = 7; - // When the course takes place (HTML). - string dates = 8; + // When the course takes place. + hpi.cloud.common.v1test.MarkupContent dates = 8; - // Additional literature for this course (HTML). - string literature = 9; + // Additional literature for this course. + hpi.cloud.common.v1test.MarkupContent literature = 9; } diff --git a/hpi/cloud/myhpi/v1test/info_bit.proto b/hpi/cloud/myhpi/v1test/info_bit.proto index 3852fd2..ce21b9e 100644 --- a/hpi/cloud/myhpi/v1test/info_bit.proto +++ b/hpi/cloud/myhpi/v1test/info_bit.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package hpi.cloud.myhpi.v1test; import "hpi/cloud/common/v1test/image.proto"; +import "hpi/cloud/common/v1test/markup_content.proto"; option java_multiple_files = true; option java_outer_classname = "InfoBitProto"; @@ -28,8 +29,8 @@ message InfoBit { // Required. A short description. string description = 6; - // HTML-formatted content that can be set in addition to the description. - string content = 10; + // Content that can be set in addition to the description. + hpi.cloud.common.v1test.MarkupContent content = 10; // Different ways children are displayed within this info bit. enum ChildDisplay { @@ -81,6 +82,6 @@ message LinkAction { } message TextAction { - // Required. The text to show (HTML). - string content = 1; + // Required. The text to show. + hpi.cloud.common.v1test.MarkupContent content = 1; } diff --git a/hpi/cloud/news/v1test/article.proto b/hpi/cloud/news/v1test/article.proto index df58079..607c1ee 100644 --- a/hpi/cloud/news/v1test/article.proto +++ b/hpi/cloud/news/v1test/article.proto @@ -5,6 +5,7 @@ package hpi.cloud.news.v1test; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "hpi/cloud/common/v1test/image.proto"; +import "hpi/cloud/common/v1test/markup_content.proto"; option java_multiple_files = true; option java_outer_classname = "ArticleProto"; @@ -37,8 +38,8 @@ message Article { // Required. A short text summarizing this article. Recommended for a preview. string teaser = 8; - // Required. The actual HTML-content of this article. - string content = 9; + // Required. The actual content of this article. + hpi.cloud.common.v1test.MarkupContent content = 9; // Categories of this article. repeated Category categories = 10; From 65db065fcc756e356b4ef2b18786f19d39b95715 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Thu, 14 Nov 2019 17:32:26 +0100 Subject: [PATCH 3/4] feat(news): normalize Article.categories, tags to IDs --- hpi/cloud/news/v1test/article.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hpi/cloud/news/v1test/article.proto b/hpi/cloud/news/v1test/article.proto index 607c1ee..1506510 100644 --- a/hpi/cloud/news/v1test/article.proto +++ b/hpi/cloud/news/v1test/article.proto @@ -41,11 +41,11 @@ message Article { // Required. The actual content of this article. hpi.cloud.common.v1test.MarkupContent content = 9; - // Categories of this article. - repeated Category categories = 10; + // IDs of categories of this article. + repeated string category_ids = 10; - // Tags of this article. - repeated Tag tags = 11; + // IDS of tags of this article. + repeated string tag_ids = 11; // The number of times this article was viewed. google.protobuf.UInt32Value view_count = 12; From d50ba485df8c196da7ac709f685cba2ba00aa408 Mon Sep 17 00:00:00 2001 From: Jonas Wanke Date: Wed, 18 Dec 2019 09:55:15 +0100 Subject: [PATCH 4/4] chore: prepare release --- .unicornfig.yml | 2 +- CHANGELOG.md | 8 +++++++- build.gradle | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.unicornfig.yml b/.unicornfig.yml index 94648f6..4f20a5a 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.11" +version: "0.0.12" githubName: "HPI-de/hpi-cloud-apis" diff --git a/CHANGELOG.md b/CHANGELOG.md index 9091748..fdf97ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.0.12] - 2019-12-18 +### BREAKING CHANGES +- **common, course, myhpi, news:** support different content types +- **news:** normalize Article.categories, tags to IDs (repeated strings) + ## [0.0.11] - 2019-10-06 ### BREAKING CHANGES - **course:** add Course.attendance, enrollment_deadline; make CourseSeries.mandatory an enum @@ -94,7 +99,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.11...dev +[Unreleased]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.12...dev +[0.0.12]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.11...0.0.12 [0.0.11]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.10...0.0.11 [0.0.10]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.9...0.0.10 [0.0.9]: https://github.com/HPI-de/hpi-cloud-apis/compare/0.0.8...0.0.9 diff --git a/build.gradle b/build.gradle index 2615ffe..4fe708d 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ ext { githubReleaseNotes = 'CHANGELOG.md' allLicenses = ["Apache-2.0"] - libraryVersion = "0.0.11" + libraryVersion = "0.0.12" } task sourcesJar(type: Jar, dependsOn: classes) {