Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Resolve Inline Models #736

Merged
merged 3 commits into from
Aug 9, 2018
Merged

[Core] Resolve Inline Models #736

merged 3 commits into from
Aug 9, 2018

Conversation

antihax
Copy link
Contributor

@antihax antihax commented Aug 4, 2018

Added InlineModelResolver.java based on work done by @bjgill to allow inline models from the specification to be resolved and assigned properly to operations, parameters.

@stkrwork stkrwork added the WIP Work in Progress label Aug 4, 2018
@wing328
Copy link
Member

wing328 commented Aug 7, 2018

Reviewing...

@wing328
Copy link
Member

wing328 commented Aug 7, 2018

I've pushed a fix: b7bff6d and the test result using the following spec looks good:

swagger: '2.0'
info:
  version: 1.0.0
consumes:
  - application/json
produces:
  - application/json

paths:
  /person:
    post:
      operationId: createPerson
      parameters:
        - name: MyObject
          in: body
          schema:
            type: object
            properties:
              email:
                type: string
                format: email
              enabled:
                type: boolean
      responses:
        default:
          description: Unexpected error

Please give it a try with your spec and see how it goes.

@wing328
Copy link
Member

wing328 commented Aug 9, 2018

We'll uncomment those tests in InlineModelResolverTest.java in a separate PR

@wing328
Copy link
Member

wing328 commented Aug 12, 2018

UPDATE: I've filed #789 to uncomment some tests and add the support for multi consumes (e.g. "application/json, application/xml")

jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request Aug 14, 2018
* master: (32 commits)
  Fixed date formatting in typescript node client (OpenAPITools#786)
  better explain usage (OpenAPITools#794)
  Fix float/double default value in C# generator (OpenAPITools#791)
  Enhancements to documentation generators (samples, default values, etc) (OpenAPITools#790)
  Remove duplicate variable declaration (OpenAPITools#792)
  Issue 758 root resource (OpenAPITools#771)
  Do not declare destructor as default when destructor is explicitly declared. (OpenAPITools#732)
  Fix C# client enum issue (OpenAPITools#774)
  [JavaScript] Update vulnerable dependencies (OpenAPITools#784)
  [Ruby] Fix method split (OpenAPITools#780)
  [Java][jaxrs-jersey] add sample with jaxrs-jersey + openapi v3 (OpenAPITools#778)
  update groupId in pom (OpenAPITools#779)
  [cpp-restsdk] Support multi-line descriptions (OpenAPITools#753)
  [Core] Resolve Inline Models (OpenAPITools#736)
  [gradle] Support nullable system property values (OpenAPITools#764)
  Correct URL for openapi-generator.cli.sh in README.md (OpenAPITools#770)
  Fixed the generation of model properties whose data type is a composed (allOf) schema (OpenAPITools#704)
  [JAX-RS][Spec] Add samples to CircleCI (OpenAPITools#759)
  minor update to python generator usage (OpenAPITools#762)
  [C++][Restbed/Pistache] Added fix for byte array (OpenAPITools#752)
  ...
@wing328
Copy link
Member

wing328 commented Aug 15, 2018

#789 merged into master. I'll file a PR this weekend or next week to uncomment more test cases in InlineModelResolverTest.java

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
* Add InlineModelResolver.java

* fix inline schema for OAS2 body parameter

* skip warning, fix MapSchema cast error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants