Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add multiple language methods #8

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,55 @@
}
}
},
"/api/Question/GetQuestionById": {
"post": {
"tags": [
"Question"
],
"operationId": "GetQuestionById",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Int64GetIdRequestContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/Int64GetIdRequestContract"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/Int64GetIdRequestContract"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/QuestionResponseContractMessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/QuestionResponseContractMessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/QuestionResponseContractMessageContract"
}
}
}
}
}
}
},
"/api/Question/HardDeleteById": {
"delete": {
"tags": [
Expand Down Expand Up @@ -953,6 +1002,9 @@
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
},
"result": {
"title": "List<AnswerContract>",
"type": "array",
Expand All @@ -978,11 +1030,59 @@
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
},
"result": {
"$ref": "#/components/schemas/AnswerContract"
}
}
},
"AnswerResponseContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"questionId": {
"type": "integer",
"format": "int64"
},
"contents": {
"title": "List<LanguageDataContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/LanguageDataContract"
}
},
"uniqueIdentity": {
"type": "string",
"nullable": true
},
"creationDateTime": {
"type": "string",
"format": "date-time"
},
"modificationDateTime": {
"title": "Nullable<DateTime>",
"type": "string",
"format": "date-time",
"nullable": true
},
"deletedDateTime": {
"title": "Nullable<DateTime>",
"type": "string",
"format": "date-time",
"nullable": true
},
"isDeleted": {
"type": "boolean"
}
}
},
"CreateAnswerRequestContract": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -1051,8 +1151,23 @@
"nullable": true
},
"stackTrace": {
"type": "string",
"nullable": true
"title": "List<String>",
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
},
"children": {
"title": "List<ErrorContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/ErrorContract"
}
},
"serviceDetails": {
"$ref": "#/components/schemas/ServiceDetailsContract"
}
}
},
Expand All @@ -1069,7 +1184,7 @@
"SessionAccessDenied",
"AccessDenied",
"InternalError",
"Dupplicate",
"Duplicate",
"Empty",
"NotFound",
"ValidationsError",
Expand Down Expand Up @@ -1219,6 +1334,9 @@
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
},
"result": {
"title": "List<GetAllQuestionsWithAnswersResponseContract>",
"type": "array",
Expand Down Expand Up @@ -1276,6 +1394,9 @@
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
},
"result": {
"type": "integer",
"format": "int64"
Expand Down Expand Up @@ -1319,6 +1440,9 @@
},
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
}
}
},
Expand Down Expand Up @@ -1378,6 +1502,9 @@
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
},
"result": {
"title": "List<QuestionContract>",
"type": "array",
Expand All @@ -1403,11 +1530,114 @@
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
},
"result": {
"$ref": "#/components/schemas/QuestionContract"
}
}
},
"QuestionResponseContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"titles": {
"title": "List<LanguageDataContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/LanguageDataContract"
}
},
"creationDateTime": {
"type": "string",
"format": "date-time"
},
"modificationDateTime": {
"title": "Nullable<DateTime>",
"type": "string",
"format": "date-time",
"nullable": true
},
"deletedDateTime": {
"title": "Nullable<DateTime>",
"type": "string",
"format": "date-time",
"nullable": true
},
"uniqueIdentity": {
"type": "string",
"nullable": true
},
"isDeleted": {
"type": "boolean"
},
"answers": {
"title": "List<AnswerResponseContract>",
"type": "array",
"nullable": true,
"items": {
"$ref": "#/components/schemas/AnswerResponseContract"
}
}
}
},
"QuestionResponseContractMessageContract": {
"title": "MessageContract<QuestionResponseContract>",
"type": "object",
"additionalProperties": false,
"properties": {
"isSuccess": {
"type": "boolean"
},
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
},
"result": {
"$ref": "#/components/schemas/QuestionResponseContract"
}
}
},
"ServiceDetailsContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"servieRouteAddress": {
"type": "string",
"nullable": true
},
"methodName": {
"type": "string",
"nullable": true
},
"path": {
"type": "string",
"nullable": true
},
"porjectName": {
"type": "string",
"nullable": true
}
}
},
"SuccessContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"endUserMessage": {
"type": "string",
"nullable": true
}
}
},
"UpdateAnswerRequestContract": {
"type": "object",
"additionalProperties": false,
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.4</Version>
<Version>0.0.0.5</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
Expand Up @@ -11,7 +11,7 @@

<ItemGroup>
<PackageReference Include="EasyMicroservices.Configuration" Version="0.0.0.2" />
<PackageReference Include="EasyMicroservices.Cores.Relational.EntityFrameworkCore" Version="0.0.0.11" />
<PackageReference Include="EasyMicroservices.Cores.Relational.EntityFrameworkCore" Version="0.0.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using EasyMicroservices.ContentsMicroservice.Clients.Attributes;
using EasyMicroservices.Cores.Interfaces;
using EasyMicroservices.QuestionsMicroservice.Contracts.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyMicroservices.QuestionsMicroservice.Contracts.Responses
{
public class AnswerResponseContract : IUniqueIdentitySchema, IDateTimeSchema, ISoftDeleteSchema
{
public long Id { get; set; }
public long QuestionId { get; set; }

public List<LanguageDataContract> Contents { get; set; }

public string UniqueIdentity { get; set; }
public DateTime CreationDateTime { get; set; }
public DateTime? ModificationDateTime { get; set; }
public DateTime? DeletedDateTime { get; set; }
public bool IsDeleted { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using EasyMicroservices.ContentsMicroservice.Clients.Attributes;
using EasyMicroservices.Cores.Interfaces;
using EasyMicroservices.QuestionsMicroservice.Contracts.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyMicroservices.QuestionsMicroservice.Contracts.Responses
{
public class QuestionResponseContract : IUniqueIdentitySchema, ISoftDeleteSchema, IDateTimeSchema
{
public long Id { get; set; }
public List<LanguageDataContract> Titles { get; set; }
public DateTime CreationDateTime { get; set; }
public DateTime? ModificationDateTime { get; set; }
public DateTime? DeletedDateTime { get; set; }
public string UniqueIdentity { get; set; }
public bool IsDeleted { get; set; }

public List<AnswerResponseContract> Answers { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="EasyMicroservices.ContentsMicroservice.Clients" Version="0.0.0.4" />
<PackageReference Include="EasyMicroservices.Cores.Database" Version="0.0.0.23" />
<PackageReference Include="EasyMicroservices.ContentsMicroservice.Clients" Version="0.0.0.10" />
<PackageReference Include="EasyMicroservices.Cores.Database" Version="0.0.0.33" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
</ItemGroup>

Expand Down
Loading
Loading