Code Monkey home page Code Monkey logo

gnostic-models's Introduction

โจ gnostic-models

This repository contains Protocol Buffer models and associated libraries for working with API description formats supported by gnostic. It exists to provide a lightweight distribution of these models with minimal dependencies. For more information, please see the gnostic repository.

Versions

Versions of this repository will be tagged with the gnostic version used to create them, e.g. "v0.7.0" will correspond to "v0.7.0" of gnostic.

Disclaimer

Feedback and contributions are welcome! Until there is a 1.0 release, please consider this prerelease software and work in progress. To ensure stable builds, we request that dependent projects always refer to tagged releases of gnostic.

Copyright

Copyright 2017-2022, Google LLC.

License

Released under the Apache 2.0 license.

gnostic-models's People

Contributors

jefftree avatar pkwarren avatar timburks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gnostic-models's Issues

OpenAPIv2.go and OpenAPIv3.go both copy mutexes, generating racy code

It seems like the openapiv2 and openapiv3 codebases include generated code that violates the Go copylock code analysis. (That code analysis checks to make sure that sync.Mutex is used with a pointer and isn't copied by value, rendering it unable to protect data.)

That code seems to be generated, so it might be a bug in the generator (I believe protoc-gen-go includes those sync.Mutex's explicitly to keep MessageState from being copied like this).

The errors look like:

openapiv2/OpenAPIv2.go:5872:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.JsonReference contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv2/OpenAPIv2.go:6248:11: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.ParametersItem contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv2/OpenAPIv2.go:6268:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.PathItem contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv2/OpenAPIv2.go:6542:11: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.ResponseValue contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv2/OpenAPIv2.go:6584:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv2.Schema contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)

and

openapiv3/OpenAPIv3.go:6085:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv3.PathItem contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)
openapiv3/OpenAPIv3.go:6213:10: assignment copies lock value to *m: github.com/google/gnostic-models/openapiv3.Reference contains google.golang.org/protobuf/internal/impl.MessageState contains sync.Mutex (copylocks)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.