forked from loafle/openapi-generator-original
updated to latest codegen
This commit is contained in:
parent
f4cd02283b
commit
2a9cf7c06d
@ -20,7 +20,7 @@ case class Definition (
|
||||
relatedWords: List[Related],
|
||||
sequence: String,
|
||||
word: String,
|
||||
textProns: List[TextPron],
|
||||
notes: List[Note],
|
||||
textProns: List[TextPron],
|
||||
partOfSpeech: String)
|
||||
|
||||
|
@ -5,15 +5,15 @@ import com.wordnik.client.model.ScoredWord
|
||||
import com.wordnik.client.model.ContentProvider
|
||||
case class Example (
|
||||
id: Long,
|
||||
text: String,
|
||||
title: String,
|
||||
exampleId: Long,
|
||||
title: String,
|
||||
text: String,
|
||||
score: ScoredWord,
|
||||
sentence: Sentence,
|
||||
year: Int,
|
||||
provider: ContentProvider,
|
||||
word: String,
|
||||
provider: ContentProvider,
|
||||
year: Int,
|
||||
rating: Float,
|
||||
url: String,
|
||||
documentId: Long)
|
||||
documentId: Long,
|
||||
url: String)
|
||||
|
||||
|
@ -2,10 +2,10 @@ package com.wordnik.client.model
|
||||
|
||||
case class Related (
|
||||
label1: String,
|
||||
label2: String,
|
||||
relationshipType: String,
|
||||
label2: String,
|
||||
label3: String,
|
||||
words: List[String],
|
||||
label4: String,
|
||||
gram: String)
|
||||
gram: String,
|
||||
label4: String)
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.wordnik.client.model
|
||||
|
||||
case class ScoredWord (
|
||||
id: Long,
|
||||
position: Int,
|
||||
lemma: String,
|
||||
id: Long,
|
||||
docTermCount: Int,
|
||||
lemma: String,
|
||||
wordType: String,
|
||||
score: Float,
|
||||
word: String,
|
||||
sentenceId: Long,
|
||||
word: String,
|
||||
stopword: Boolean,
|
||||
baseWordScore: Double,
|
||||
partOfSpeech: String)
|
||||
|
@ -2,8 +2,8 @@ package com.wordnik.client.model
|
||||
|
||||
import com.wordnik.client.model.ScoredWord
|
||||
case class Sentence (
|
||||
id: Long,
|
||||
hasScoredWords: Boolean,
|
||||
id: Long,
|
||||
scoredWords: List[ScoredWord],
|
||||
display: String,
|
||||
rating: Int,
|
||||
|
@ -2,7 +2,7 @@ package com.wordnik.client.model
|
||||
|
||||
case class SimpleExample (
|
||||
id: Long,
|
||||
text: String,
|
||||
title: String,
|
||||
text: String,
|
||||
url: String)
|
||||
|
||||
|
@ -3,8 +3,8 @@ package com.wordnik.client.model
|
||||
case class User (
|
||||
id: Long,
|
||||
username: String,
|
||||
status: Int,
|
||||
email: String,
|
||||
status: Int,
|
||||
faceBookId: String,
|
||||
userName: String,
|
||||
displayName: String,
|
||||
|
@ -3,14 +3,14 @@ package com.wordnik.client.model
|
||||
import java.util.Date
|
||||
case class WordList (
|
||||
id: Long,
|
||||
updatedAt: Date,
|
||||
username: String,
|
||||
permalink: String,
|
||||
description: String,
|
||||
createdAt: Date,
|
||||
lastActivityAt: Date,
|
||||
name: String,
|
||||
createdAt: Date,
|
||||
updatedAt: Date,
|
||||
lastActivityAt: Date,
|
||||
username: String,
|
||||
userId: Long,
|
||||
description: String,
|
||||
numberWordsInList: Long,
|
||||
`type`: String)
|
||||
|
||||
|
@ -3,10 +3,10 @@ package com.wordnik.client.model
|
||||
import java.util.Date
|
||||
case class WordListWord (
|
||||
id: Long,
|
||||
username: String,
|
||||
createdAt: Date,
|
||||
userId: Long,
|
||||
numberCommentsOnWord: Long,
|
||||
word: String,
|
||||
username: String,
|
||||
userId: Long,
|
||||
createdAt: Date,
|
||||
numberCommentsOnWord: Long,
|
||||
numberLists: Long)
|
||||
|
||||
|
@ -2,8 +2,8 @@ package com.wordnik.client.model
|
||||
|
||||
case class WordObject (
|
||||
id: Long,
|
||||
originalWord: String,
|
||||
word: String,
|
||||
originalWord: String,
|
||||
suggestions: List[String],
|
||||
canonicalForm: String,
|
||||
vulgar: String)
|
||||
|
@ -11,10 +11,10 @@ case class WordOfTheDay (
|
||||
createdBy: String,
|
||||
createdAt: Date,
|
||||
contentProvider: ContentProvider,
|
||||
word: String,
|
||||
htmlExtra: String,
|
||||
word: String,
|
||||
definitions: List[SimpleDefinition],
|
||||
examples: List[SimpleExample],
|
||||
publishDate: Date,
|
||||
note: String)
|
||||
note: String,
|
||||
publishDate: Date)
|
||||
|
||||
|
@ -2,6 +2,6 @@ package com.wordnik.client.model
|
||||
|
||||
import com.wordnik.client.model.WordSearchResult
|
||||
case class WordSearchResults (
|
||||
totalResults: Int,
|
||||
searchResults: List[WordSearchResult])
|
||||
searchResults: List[WordSearchResult],
|
||||
totalResults: Int)
|
||||
|
||||
|
@ -25,7 +25,7 @@ class WordApiTest extends FlatSpec with ShouldMatchers with BaseApiTest {
|
||||
it should "verify the word apis" in {
|
||||
val json = Source.fromURL("http://api.wordnik.com/v4/word.json").mkString
|
||||
val doc = JsonUtil.getJsonMapper.readValue(json, classOf[Documentation])
|
||||
assert(doc.getApis.size === 11)
|
||||
assert(doc.getApis.size === 12)
|
||||
}
|
||||
|
||||
it should "fetch a word" in {
|
||||
|
@ -24,17 +24,17 @@ class WordListApiTest extends FlatSpec with ShouldMatchers with BaseApiTest {
|
||||
val wordListsApi = new WordListsApi
|
||||
|
||||
val wordList = WordList(
|
||||
0,
|
||||
new java.util.Date,
|
||||
null,
|
||||
null,
|
||||
"some words I want to play with",
|
||||
null,
|
||||
null,
|
||||
"my test list",
|
||||
0,
|
||||
0,
|
||||
"PUBLIC")
|
||||
0, // id
|
||||
null, // permalink
|
||||
"my test list", // name
|
||||
new java.util.Date, //created at
|
||||
null, // updated at
|
||||
null, // lastActivityAt
|
||||
null, // username
|
||||
0, // user id
|
||||
"some words I want to play with", // description
|
||||
0, // words in list
|
||||
"PUBLIC") // type
|
||||
|
||||
var sampleList = wordListsApi.createWordList(wordList, auth.token) match {
|
||||
case Some(wl) => wl
|
||||
|
Loading…
x
Reference in New Issue
Block a user