انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-021-L01

مواصفة OpenAPI

  • الدرس 1 من 5
  • Junior
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

read an OpenAPI document.

الموضوعات المخطط لها

  • OpenAPI is a standard, machine-readable description of an HTTP API, written in YAML or JSON.
  • info names the API and its version. servers lists base URLs.
  • paths lists URLs; each path has operations (get, post, ...).
  • An operation lists parameters, a request body, and responses by status code.
  • Reusable shapes live in components/schemas and are referenced with $ref.
تفاصيل المخطط المبدئي

عرض عملي

yaml
openapi: 3.0.3
info: { title: Shop API, version: 1.0.0 }
paths:
  /products/{id}:
    get:
      parameters:
        - { name: id, in: path, required: true, schema: { type: integer } }
      responses:
        "200": { description: OK }
        "404": { description: Not found }

اختبر فهمك

Where do reusable schemas live?

أظهر الإجابة

Under components/schemas.

التطبيق

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

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.