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: 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) { 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..1506510 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,14 +38,14 @@ 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; + // 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;