Validate language-model mock output against the schema in OpenApiMockResponsePlugin

Đang mở
#2,039 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@waldekmastykarz đang làm issue này rồi.

Từ ngày 31/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

on hold

OpenApiMockResponsePlugin (#2036) can generate mock bodies with a language model, but it checks only the top-level JSON type of the model's output. If the output breaks schema constraints (e.g. minimum, required, enum, pattern), it is still served as the mock.

Proposal: once OpenApiValidationPlugin (#2037) is merged, validate the model's output with its OpenApiSchemaValidator. If validation fails, fall back to the schema-based sample generator (and log why).

On hold until these are merged:

  • #2036 (OpenApiMockResponsePlugin, closes #531)
  • #2037 (OpenApiValidationPlugin, closes #779)
Ngôn ngữ chính
C#
Star
838
Fork
90
Merge trung bình
2 ngày 11 giờ
Pull request đã merge (30 ngày)
59

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dotnet/dev-proxy

Tất cả issue của dotnet/dev-proxy

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.