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

Form for standalone model's adds an extra "value" property to examples #176

Closed
rossmcdonald opened this issue Oct 8, 2019 · 8 comments
Closed

Comments

@rossmcdonald
Copy link
Collaborator

@rossmcdonald rossmcdonald commented Oct 8, 2019

Reproduce

  1. Create a standalone model
  2. Add an example
  3. Notice the result has an extra "value" property nested in each example:
x-examples:
  example:
    value:
      latitude: 123
      longitude: 456

This is valid for embedded openapi 3 definitions, but not for standalone json schema models.

@marbemac

This comment has been minimized.

Copy link
Member

@marbemac marbemac commented Oct 10, 2019

@lottamus @ssspear can we get this scheduled for v1.2.1?

@lottamus

This comment has been minimized.

@ssspear ssspear removed their assignment Oct 11, 2019
@marbemac

This comment has been minimized.

Copy link
Member

@marbemac marbemac commented Oct 14, 2019

@lottamus this is a standalone model file - so it's independent of oas3 versus oas2 right?

@lottamus

This comment has been minimized.

Copy link
Member

@lottamus lottamus commented Oct 14, 2019

@marbemac correct but it's using the same form components so this logic needs to be flipped : stoplightio/studio-internal@2a84abf#diff-5c6b173215ac8c3ccee0f3b7ab39ae44R105

@StoplightDeb

This comment has been minimized.

Copy link

@StoplightDeb StoplightDeb commented Nov 7, 2019

@ssspear - I'm still seeing value on current staging environment (web & app), so moving this back over

@lottamus

This comment has been minimized.

Copy link
Member

@lottamus lottamus commented Nov 7, 2019

@StoplightDeb the issue isn't seeing "value" in the read view. The issue was that the forms were incorrectly adding the "value" property

@lottamus lottamus changed the title Model examples display with a "value" object in Read view Form for standalone model's adds an extra "value" property to examples Nov 7, 2019
@lottamus

This comment has been minimized.

Copy link
Member

@lottamus lottamus commented Nov 7, 2019

Updated the title + description to reflect

@StoplightDeb

This comment has been minimized.

Copy link

@StoplightDeb StoplightDeb commented Nov 7, 2019

@lottamus thanks for updating it
now I can see that it looks good! Sorry to be an alarmist, @ssspear !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.