Skip to content

Commit

Permalink
Merge pull request #5 from Elyas-Amini/develop
Browse files Browse the repository at this point in the history
Update Questions and answers
  • Loading branch information
Ali-YousefiTelori authored Sep 12, 2023
2 parents 61ee343 + d040743 commit 86735c1
Show file tree
Hide file tree
Showing 11 changed files with 273 additions and 174 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -427,27 +427,27 @@
}
}
},
"/api/Question/GetAllQuestionsWithAnswers": {
"/api/Question/Add": {
"post": {
"tags": [
"Question"
],
"operationId": "GetAllQuestionsWithAnswers",
"operationId": "Add2",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersRequestContract"
"$ref": "#/components/schemas/CreateQuestionRequestContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersRequestContract"
"$ref": "#/components/schemas/CreateQuestionRequestContract"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersRequestContract"
"$ref": "#/components/schemas/CreateQuestionRequestContract"
}
}
}
Expand All @@ -458,45 +458,45 @@
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersResponseListMessageContract"
"$ref": "#/components/schemas/Int64MessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersResponseListMessageContract"
"$ref": "#/components/schemas/Int64MessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersResponseListMessageContract"
"$ref": "#/components/schemas/Int64MessageContract"
}
}
}
}
}
}
},
"/api/Question/Add": {
"post": {
"/api/Question/Update": {
"put": {
"tags": [
"Question"
],
"operationId": "Add2",
"operationId": "Update2",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateQuestionRequestContract"
"$ref": "#/components/schemas/UpdateQuestionRequestContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/CreateQuestionRequestContract"
"$ref": "#/components/schemas/UpdateQuestionRequestContract"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/CreateQuestionRequestContract"
"$ref": "#/components/schemas/UpdateQuestionRequestContract"
}
}
}
Expand All @@ -507,45 +507,45 @@
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/Int64MessageContract"
"$ref": "#/components/schemas/QuestionContractMessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/Int64MessageContract"
"$ref": "#/components/schemas/QuestionContractMessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/Int64MessageContract"
"$ref": "#/components/schemas/QuestionContractMessageContract"
}
}
}
}
}
}
},
"/api/Question/Update": {
"put": {
"/api/Question/GetAllQuestionsWithAnswers": {
"post": {
"tags": [
"Question"
],
"operationId": "Update2",
"operationId": "GetAllQuestionsWithAnswers",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateQuestionRequestContract"
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersRequestContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/UpdateQuestionRequestContract"
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersRequestContract"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/UpdateQuestionRequestContract"
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersRequestContract"
}
}
}
Expand All @@ -556,17 +556,17 @@
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/QuestionContractMessageContract"
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersResponseContractListMessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/QuestionContractMessageContract"
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersResponseContractListMessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/QuestionContractMessageContract"
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersResponseContractListMessageContract"
}
}
}
Expand Down Expand Up @@ -991,13 +991,13 @@
"type": "integer",
"format": "int64"
},
"englishContent": {
"type": "string",
"nullable": true
},
"persianContent": {
"type": "string",
"nullable": true
"contents": {
"title": "List<LanguageDataContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/LanguageDataContract"
}
},
"uniqueIdentity": {
"type": "string",
Expand All @@ -1009,13 +1009,17 @@
"type": "object",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"nullable": true
},
"uniqueIdentity": {
"type": "string",
"nullable": true
},
"titles": {
"title": "List<LanguageDataContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/LanguageDataContract"
}
}
}
},
Expand Down Expand Up @@ -1178,7 +1182,7 @@
}
}
},
"GetAllQuestionsWithAnswersResponse": {
"GetAllQuestionsWithAnswersResponseContract": {
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -1204,8 +1208,8 @@
}
}
},
"GetAllQuestionsWithAnswersResponseListMessageContract": {
"title": "ListMessageContract<GetAllQuestionsWithAnswersResponse>",
"GetAllQuestionsWithAnswersResponseContractListMessageContract": {
"title": "ListMessageContract<GetAllQuestionsWithAnswersResponseContract>",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -1216,11 +1220,11 @@
"$ref": "#/components/schemas/ErrorContract"
},
"result": {
"title": "List<GetAllQuestionsWithAnswersResponse>",
"title": "List<GetAllQuestionsWithAnswersResponseContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersResponse"
"$ref": "#/components/schemas/GetAllQuestionsWithAnswersResponseContract"
}
},
"hasItems": {
Expand Down Expand Up @@ -1292,6 +1296,20 @@
}
}
},
"LanguageDataContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"languageName": {
"type": "string",
"nullable": true
},
"data": {
"type": "string",
"nullable": true
}
}
},
"MessageContract": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -1402,13 +1420,13 @@
"type": "integer",
"format": "int64"
},
"englishContent": {
"type": "string",
"nullable": true
},
"persianContent": {
"type": "string",
"nullable": true
"content": {
"title": "List<LanguageDataContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/LanguageDataContract"
}
},
"uniqueIdentity": {
"type": "string",
Expand All @@ -1424,9 +1442,13 @@
"type": "integer",
"format": "int64"
},
"title": {
"type": "string",
"nullable": true
"titles": {
"title": "List<LanguageDataContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/LanguageDataContract"
}
},
"uniqueIdentity": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.0.0.2</Version>
<Version>0.0.0.3</Version>
<Description>client generated code.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>microservice,Question,Questions,client</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyMicroservices.QuestionsMicroservice.Contracts.Common
{
public class LanguageDataContract
{
public string LanguageName { get; set; }
public string Data { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using EasyMicroservices.Cores.Interfaces;
using EasyMicroservices.ContentsMicroservice.Clients.Attributes;
using EasyMicroservices.Cores.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -10,6 +11,7 @@ namespace EasyMicroservices.QuestionsMicroservice.Contracts.Common
public class QuestionContract : IUniqueIdentitySchema, ISoftDeleteSchema, IDateTimeSchema
{
public long Id { get; set; }
[ContentLanguage]
public string Title { get; set; }
public DateTime CreationDateTime { get; set; }
public DateTime? ModificationDateTime { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EasyMicroservices.QuestionsMicroservice.Contracts.Common;

namespace EasyMicroservices.QuestionsMicroservice.Contracts.Requests
{
public class CreateAnswerRequestContract
{
public long QuestionId { get; set; }
public string EnglishContent { get; set; }
public string PersianContent { get; set; }
public List<LanguageDataContract> Contents { get; set; }
public string UniqueIdentity { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using EasyMicroservices.QuestionsMicroservice.Contracts.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand All @@ -8,8 +9,8 @@ namespace EasyMicroservices.QuestionsMicroservice.Contracts.Requests
{
public class CreateQuestionRequestContract
{
public string Title { get; set; }
public string UniqueIdentity { get; set; }
public List<LanguageDataContract> Titles { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using EasyMicroservices.QuestionsMicroservice.Contracts.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand All @@ -10,8 +11,7 @@ public class UpdateAnswerRequestContract
{
public long Id { get; set; }
public long QuestionId { get; set; }
public string EnglishContent { get; set; }
public string PersianContent { get; set; }
public List<LanguageDataContract> Content { get; set; }
public string UniqueIdentity { get; set; }
}
}
Loading

0 comments on commit 86735c1

Please sign in to comment.