Thanks for the clarification! I did not see a one-to-one mapping between those annotation element and a swagger spec property.
On Mon, Aug 14, 2017 at 1:02 PM, Ron Ratovsky <[email protected]> wrote: > They’re not missing from the spec, they either have a meaning outside the > spec, translate to something in the spec, or should be deprecated. > > > > access = allows you to filter out properties before making it into the API > definition. > > allowableValues = allows you to set the enum values if applicable. > > dataType = `type`/`schema` > > hidden = allows you to always hide the property from the API definition. > > notes = I believe that should be deprecated > > > > > > > > *From: *<[email protected]> on behalf of Chris > Cosentino <[email protected]> > *Reply-To: *"[email protected]" < > [email protected]> > *Date: *Monday, August 14, 2017 at 06:54 > *To: *"[email protected]" <swagger-swaggersocket@ > googlegroups.com> > *Subject: *Re: ApiModelProperty annotation - "position" element not > supported in 2.0 Schema? > > > > Thanks Ron, > > It looks like the following annotation elements for ApiModelProperty are > also missing from the 2.0 spec: > > access > > allowableValues > > dataType > hidden > > notes > > > > > > On Fri, Aug 11, 2017 at 9:38 PM, Ron Ratovsky <[email protected]> wrote: > > Not sure why it’s not, but position should be deprecated from that > annotation. It’s definitely not supported by the spec. > > > > > > > > *From: *<[email protected]> on behalf of Chris > Cosentino <[email protected]> > *Reply-To: *"[email protected]" < > [email protected]> > *Date: *Friday, August 11, 2017 at 14:40 > *To: *Swagger <[email protected]> > *Subject: *ApiModelProperty annotation - "position" element not supported > in 2.0 Schema? > > > > > Hello! > > We are using Swagger Annotations and for the APIModelProperty annotation ( > http://docs.swagger.io/swagger-core/current/apidocs/ > io/swagger/annotations/ApiModelProperty.html) we use the position element. > > However, when trying to validate against the swagger 2.0 specification ( > https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/ > schemas/v2.0/schema.json) it returns an error: > > jsonschema.exceptions.ValidationError: u'position' does not match any of > the regexes: u'^x-' > > Is the annotation API incorrect in stating that it supports the position > element, or is the swagger schema missing the position element? > > I understand we can get around this by prefacing the name of the > "position" property with "x-", but we were trying to follow the standards. > > The reason we use the position property is to order the properties for any > given API model manually for better readability. > > Is this an omission in the 2.0 schema? > > Thanks much, > Chris > > -- > You received this message because you are subscribed to the Google Groups > "Swagger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Swagger" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/swagger-swaggersocket/qqT0UWHXqO8/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > > > > -- > You received this message because you are subscribed to the Google Groups > "Swagger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Swagger" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/swagger-swaggersocket/qqT0UWHXqO8/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
