Open
Conversation
Gwymlas
requested changes
Mar 19, 2026
Gwymlas
left a comment
There was a problem hiding this comment.
Переделать доменную область и правила генерации, сейчас не соответствует заданию
| /// <summary> | ||
| /// Контроллер для генерации и получения характеристик транспортных средств | ||
| /// </summary> | ||
|
|
| /// <param name="id">Идентификатор машины</param> | ||
| /// <param name="cancellationToken">Токен отмены</param> | ||
| [HttpGet("{id}")] | ||
| public async Task<ActionResult<Vehicle>> GetById([FromRoute] int id, CancellationToken cancellationToken) |
There was a problem hiding this comment.
Добавить атрибут ProducesResponseType и можно типизировать id
|
|
||
| public VehicleFaker() | ||
| { | ||
| var fuelTypes = new[] { "Бензин", "Дизель", "Электро", "Гибрид", "Газ" }; |
There was a problem hiding this comment.
Вынести это и ниже по коду справочники в private static readonly поля
| } | ||
| } | ||
|
|
||
| public class CachedVehicleGeneratorService( |
| .WithEndpoint("http", e => e.Port = 5179); | ||
|
|
||
| builder.AddProject<Projects.Client_Wasm>("client") | ||
| .WithReference(api) |
Comment on lines
+8
to
+17
| public required int Id { get; set; } | ||
| public required string Brand { get; set; } | ||
| public required string Model { get; set; } | ||
| public required string RegistrationNumber { get; set; } | ||
| public required string OwnerName { get; set; } | ||
| public int Year { get; set; } | ||
| public decimal EngineVolume { get; set; } | ||
| public int Mileage { get; set; } | ||
| public required string FuelType { get; set; } | ||
| public decimal Price { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ФИО: Нестеренко Андрей
Номер группы: 6512
Номер лабораторной: 1
Номер варианта: 29
Краткое описание предметной области: Транспортное средство
Краткое описание добавленных фич: реализована модель данных, добавлен сервис генерации, сделан endpoint, добавлен кеш, оркестратор