Skillpedia
واجهات API والخوادم (backend)40k · #7067

aspnet-minimal-api-openapi

ما الذي تفعله

تساعد هذه المهارة على إنشاء مقتطفات كود لموقع أو تطبيق ويب باستخدام ASP.NET. تضمن أن تكون المعلومات المرسلة والمستقبلة منظمة، وأن يكون التوثيق (مثل الدليل) واضحاً وكاملاً.

متى تستخدمها

  • ✓عندما تحتاج إلى إنشاء ميزات جديدة لموقع.
  • ✓عند تنظيم أجزاء متعددة من تطبيق ويب.
  • ✓لضمان بقاء توثيق الكود محدّثاً دائماً.

رابط المهارة

https://github.com/github/awesome-copilot/blob/main/skills/aspnet-minimal-api-openapi/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/github/awesome-copilot/blob/main/skills/aspnet-minimal-api-openapi/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أنشئ نقطة نهاية لتسجيل مستخدم جديد بالاسم والبريد الإلكتروني، وأعِد معرّف المستخدم المُنشأ.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تصف المعلومات التي يحتاج كودك إلى استقبالها وما يجب أن يعيده. تنظّم هذه المهارة ذلك وتولّد التوثيق تلقائياً، كخريطة للمطورين الآخرين.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

ASP.NET Minimal API with OpenAPI

Your goal is to help me create well-structured ASP.NET Minimal API endpoints with correct types and comprehensive OpenAPI/Swagger documentation.

API Organization

  • Group related endpoints using MapGroup() extension
  • Use endpoint filters for cross-cutting concerns
  • Structure larger APIs with separate endpoint classes
  • Consider using a feature-based folder structure for complex APIs

Request and Response Types

  • Define explicit request and response DTOs/models
  • Create clear model classes with proper validation attributes
  • Use record types for immutable request/response objects
  • Use meaningful property names that align with API design standards
  • Apply [Required] and other validation attributes to enforce constraints
  • Use the ProblemDetailsService and StatusCodePages to get standard error responses

Type Handling

  • Use strongly-typed route parameters with explicit type binding
  • Use Results<T1, T2> to represent multiple response types
  • Return TypedResults instead of Results for strongly-typed responses
  • Leverage C# 10+ features like nullable annotations and init-only properties

OpenAPI Documentation

  • Use the built-in OpenAPI document support added in .NET 9
  • Define operation summary and description
  • Add operationIds using the WithName extension method
  • Add descriptions to properties and parameters with [Description()]
  • Set proper content types for requests and responses
  • Use document transformers to add elements like servers, tags, and security schemes
  • Use schema transformers to apply customizations to OpenAPI schemas
الأسئلة الشائعة

ما هي «نقاط النهاية» (endpoints)؟

هي نقاط دخول يرسل التطبيق من خلالها معلومات محددة ويستقبلها.

ما هو «OpenAPI/Swagger»؟

هو طريقة معيارية لوصف واجهات البرمجة (نقاط الدخول) وتوثيقها، حتى يفهم الآخرون كيفية استخدامها.

ما هي «DTOs/models»؟

هي بنى تحدد كيف تُنظَّم البيانات عند إرسالها أو استقبالها من التطبيق.

التفاصيل

الوصف الأصلي من المؤلف

Create ASP.NET Minimal API endpoints with proper OpenAPI documentation

repo: github/awesome-copilot

الشعبية

نجوم GitHub
40k
الترتيب
#7067
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة