tryAGI / tryAGI/AutoSDK

Feature: Validation using System.ComponentModel.Annotations

Open
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
92
Forks
8
Avg merge
1d 6h
Merged PRs (30d)
4

Description

System.ComponentModel.Annotations provides attributes and classes for adding metadata to your data models. Common uses include:

1.	Validation: Attributes like [Required], [StringLength], and [Range] for data validation.
2.	Display: Attributes like [Display] to specify display names and formats.
3.	Metadata: Attributes like [MetadataType] for associating metadata with types.

https://swagger.io/docs/specification/data-models/data-types/ -> Minimum and Maximum

using System.ComponentModel.DataAnnotations;

public class Person
{
    [Required] // Marks this property as required
    [StringLength(100)] // Sets the maximum length
    public string Name { get; set; }

    [Range(0, 120)] // Specifies acceptable range for the age
    public int Age { get; set; }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or generator entry points. First clarify which System.ComponentModel.DataAnnotations attributes are supported and how they should map to the Swagger data model, including minimum and maximum; the work is done when those mappings are implemented and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.