orval icon indicating copy to clipboard operation
orval copied to clipboard

fix(core): unexecpect insterd blank schema so revert #1219

Open soartec-lab opened this issue 1 year ago • 2 comments

Status

HOLD

Description

fix https://github.com/anymaniax/orval/issues/1227 When I responded to #1219, it caused unintended destruction, so I revert it. The issue where the interface definition results in an error when interface is an blank schema is resolved by replacing the value only in the case of interfaces.

Related PRs

  • https://github.com/anymaniax/orval/pull/1219

Todos

  • [x] Tests
  • [x] Documentation
  • [x] Changelog Entry (unreleased)

Steps to Test or Reproduce

  1. prepared openapi woth blank object
openapi: 3.0.3
info:
  description: test
  title: test
  version: test
paths:
  /ping:
    get:
      summary: test
      responses:
        '200':
          description: ok
components:
  schemas:
    DbNotificationID: {}
  1. execute orval
  2. check generated definition is valid

soartec-lab avatar Feb 19 '24 00:02 soartec-lab

This PR will be on hold until the discussion in #1227 is over. If you are in a hurry to fix the problem, I think this PR will help you.

soartec-lab avatar Feb 19 '24 00:02 soartec-lab

@soartec-lab i added my openapi JSON an Orval config in the ticket if you want to verify.

melloware avatar Feb 19 '24 12:02 melloware

@melloware thanks. I missed typo so i'll fix it. And i need some more time for inspection.

soartec-lab avatar Feb 29 '24 00:02 soartec-lab

@melloware I have completed this PR, so please give me a review.

soartec-lab avatar Mar 01 '24 00:03 soartec-lab

Thanks!!

melloware avatar Mar 01 '24 00:03 melloware