Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

fix issue with schema ref generation #121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DerekStrickland
Copy link
Contributor

No description provided.

@DerekStrickland DerekStrickland added the bug Something isn't working label Sep 21, 2022
@DerekStrickland DerekStrickland self-assigned this Sep 21, 2022
Comment on lines 416 to +419
func (b *specBuilder) resolveRefPaths() {
for _, schemaRef := range b.spec.Model.Components.Schemas {
for schemaName, schemaRef := range b.spec.Model.Components.Schemas {
// Next make sure the refs point to other schemas, if not already done.
for _, propertyRef := range schemaRef.Value.Properties {
for propertyName, propertyRef := range schemaRef.Value.Properties {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting different outputs on different runs instead of the spec generating being idempotent. I'm noticing we're using maps here, which are iterated randomly. Are we accidentally relying on map order somewhere?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants